Commit Graph

22 Commits

Author SHA1 Message Date
Jacob Vosmaer dc7c6bede2 Move GitHooksService to Gitlab::Git 2017-08-23 10:45:20 +02:00
Sam Rose 1ebd9dad8e Add confirm delete protected branch modal 2017-05-08 07:41:58 +00:00
James Edwards-Jones bf3cc824e4 Moved Project#protected_branch? to ProtectedBranch, similar for tags 2017-04-03 19:19:54 +01:00
Semyon Pupkov 724864eeb4 Remove unnecessary require_relative calls from service classes
Rails by default use autoload for all dirs from app folder.
require_relative not needed. See ActiveSupport::Dependencies.autoload_paths
2016-11-22 11:25:00 +05:00
Alejandro Rodríguez fa3bbd449e Fix lightweight tags not processed correctly by GitTagPushService
When we updated gitlab_git to 10.4.1, `tag.target` changed from pointing
to the sha of the tag to the sha of the commit the tag points to. The
problem is that only annotated tags have `object_sha`s, lightweight tags
don't (it's nil), so (only) in their case we still need to use
`tag.target`.
2016-10-28 13:53:18 -03:00
Lin Jen-Shin d5264e8804 Simplify the name for data builder, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13671791
2016-08-12 16:09:29 +08:00
Lin Jen-Shin 984367f957 Move those builders to their own namespace, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13540099
2016-08-04 23:44:27 +08:00
Alejandro Rodríguez d00679d54f Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects 2016-07-28 12:24:47 -04:00
Alejandro Rodríguez 3dc8075af5 Revert "Merge branch '17073-tagscontroller-index-is-terrible-response-time-goes-up-to-5-…"
This reverts merge request !5375
2016-07-24 18:45:14 +00:00
Alejandro Rodríguez 065a65adfe Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects 2016-07-21 18:00:16 -04:00
Valery Sizov 3baed8cb6d Services: code style fixes, minor refactoring 2016-07-06 20:58:43 +03:00
Valery Sizov bf218337ed Better message for git hooks and file locks 2016-07-04 15:31:49 +03:00
Stan Hu 4603e57147 Fix duplicated branch creation/deletion Web hooks/service notifications when using Web UI
Similar to 423d2d6, except duplicates occurred only if a Web service (e.g. Slack) were
configured.

When deleting a branch, this is what was happening:

    1. DeleteBranchService calls execute_hooks and execute_services
    2. The call to repository.rm_branch triggers the GitHooksService.
    3. This, in turn, calls GitPushService and then calls the same hooks/services again.

5145706 now makes it no longer necessary for DeleteBranchService and CreateBranchService to execute
the branch hooks/services. Note that tags behave differently in GitTagPushService and GitPushService
is not called.

Closes #10330
2016-02-09 06:22:49 -08:00
Stan Hu 423d2d621a Fix duplicated branch creation/deletion events when using Web UI
When deleting a branch, this is what was happening:

1. DeleteBranchService calls EventCreateService and creates an event.
2. The call to repository.rm_branch triggers the GitHooksService.
3. This, in turn, calls GitPushService and then calls EventCreateService again.

5145706c now makes it no longer necessary for DeleteBranchService and CreateBranchService to create an event.

Closes #4304
2016-01-08 00:37:41 -08:00
Rubén Dávila 5145706c82 Run custom Git hooks when creating or deleting branches through the UI. #1156 2015-12-03 09:39:15 -05:00
Douwe Maan 10421674af Ecevute hooks and services when branches are created/deleted through web. 2015-03-13 16:07:02 +01:00
Douwe Maan 84d28209b6 Use PushDataBuilder where applicable. 2015-03-13 16:06:56 +01:00
Douwe Maan 07d05d2df7 Move all event creation to EventCreateService. 2015-02-13 12:02:58 +01:00
Ciro Santilli ad47993ac4 Factor error and success methods from services. 2014-09-21 11:43:05 +02:00
Robert Schilling 551145bc98 Validate branch-names and references in WebUI, API
Add specs for GitRefValidator
2014-09-03 13:08:35 +02:00
Dmitriy Zaporozhets 0455391add
Improve branch-removal logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-22 14:39:09 +03:00
Dmitriy Zaporozhets 88781783dd
Delete branch service with permission checks
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-22 14:23:20 +03:00