summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-11-15 12:08:22 +0000
committerDouwe Maan <douwe@gitlab.com>2016-11-15 12:08:22 +0000
commit374b8e95c38833d6aeee491b077bd43c023c0686 (patch)
tree835d9ec86a4ff178b7a4891adbdb39a26ce9a5b6 /config
parentfdd7e3f6e93e02adacf283071f88e3284449bb3a (diff)
parent1afab9eb79c87f32c7b899e58bc9a0ea8a113594 (diff)
downloadgitlab-ce-374b8e95c38833d6aeee491b077bd43c023c0686.tar.gz
Merge branch '21076-deleted-merged-branches' into 'master'
Add button to delete all merged branches ## What does this MR do? 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. **Note** ~~This MR is WIP until MR !6408 is merged.~~ ## Are there points in the code the reviewer needs to double check? The UX of the actual "Delete merged branches" button. ## Why was this MR needed? Fixes #21076 ## Screenshots ![Branches page without "Delete all merged" button](/uploads/3a2936a83c3547a0fce92a74af880a2d/Screen_Shot_2016-10-17_at_20.06.30.png) Before: ![Screen_Shot_2016-10-17_at_20.07.11](/uploads/55efcebf4e0a45dbfc70ba4a11ca152c/Screen_Shot_2016-10-17_at_20.07.11.png) After: ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #21076 See merge request !6449
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 82defb0ba71..9cf8465dca8 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -125,6 +125,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 0aec8aedf72..f3531dd30a5 100644
--- a/config/sidekiq_queues.yml
+++ b/config/sidekiq_queues.yml
@@ -34,6 +34,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]