Commit graph

8 commits

Author SHA1 Message Date
Ahmad Sherif
50749135aa Remove allow_n_plus_1 block from DeleteMergedBranchesService
Fixes #37438
Fixes gitaly#999
2018-02-12 17:22:26 +01:00
Toon Claes
ca3c868567 When deleting merged branches, ignore protected tags
In gitlab-org/gitlab-ce!13251 wildcard Protected Branches were handled
properly when deleting all merged branches. But this fix wasn't that
good. It also checked branch names against Protected Tags. That's not
correct.

This change will **only** check if there is a Protected Branch
matching the merged branch, and ignores Protected Tags.

Closes gitlab-org/gitlab-ce#39732.
2017-11-07 16:58:36 +01:00
Andrew Newdigate
64d7ec0a9e Detect n+1 issues involving Gitaly 2017-09-19 10:55:37 +00:00
Toon Claes
35081a77b0 Make Delete Merged Branches handle wildcard protected branches correctly
The "Delete Merged Branches" button should filter out protected
branches matching the wildcard patterns.

Closes gitlab-org/gitlab-ce#35592.
2017-08-02 14:45:54 +02:00
Toon Claes
e0f106ae97 DeleteMergedBranchesService should not delete protected branches
When deleting all the branches that are merged, the protected branches
should not be deleted.
2017-07-04 12:14:40 +02:00
Stan Hu
11fd2f80b0 Don't delete a branch involved in an open merge request in "Delete all merged branches" service
Customers were surprised by the previous behavior, which destroyed branches
even though an open merge request existed for it.

Closes #29427
2017-04-19 07:56:08 -07: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
Toon Claes
1afab9eb79 Add button to delete all merged branches
It adds a button to the branches page that the user can use to delete
all the branches that are already merged. This can be used to clean up
all the branches that were forgotten to delete while merging MRs.

Fixes #21076.
2016-11-09 21:04:03 +01:00