summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorToon Claes <toon@iotcl.com>2016-09-21 16:15:12 +0200
committerToon Claes <toon@iotcl.com>2016-11-09 21:04:03 +0100
commit1afab9eb79c87f32c7b899e58bc9a0ea8a113594 (patch)
tree33068aabffdb6b76c0489246429a3a71c2b748a4 /config
parentc392b0cc24ba40e3fed920c6c693cb24665193af (diff)
downloadgitlab-ce-1afab9eb79c87f32c7b899e58bc9a0ea8a113594.tar.gz
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.
Diffstat (limited to 'config')
-rw-r--r--config/routes/project.rb1
-rw-r--r--config/sidekiq_queues.yml1
2 files changed, 2 insertions, 0 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 8142e231621..b4ee3f68e14 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -300,6 +300,7 @@ resources :namespaces, path: '/', constraints: { id: /[a-zA-Z.0-9_\-]+/ }, only:
end
resources :branches, only: [:index, :new, :create, :destroy], constraints: { id: Gitlab::Regex.git_reference_regex }
+ delete :merged_branches, controller: 'branches', action: :destroy_all_merged
resources :tags, only: [:index, :show, :new, :create, :destroy], constraints: { id: Gitlab::Regex.git_reference_regex } do
resource :release, only: [:edit, :update]
end
diff --git a/config/sidekiq_queues.yml b/config/sidekiq_queues.yml
index f36fe893fd0..d0e6eb93fb2 100644
--- a/config/sidekiq_queues.yml
+++ b/config/sidekiq_queues.yml
@@ -33,6 +33,7 @@
- [project_service, 1]
- [clear_database_cache, 1]
- [delete_user, 1]
+ - [delete_merged_branches, 1]
- [expire_build_instance_artifacts, 1]
- [group_destroy, 1]
- [irker, 1]