Commit graph

10 commits

Author SHA1 Message Date
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