From ca5cd7b7fb5108d30d0f6b74e31da736024592dd Mon Sep 17 00:00:00 2001 From: Igor Drozdov Date: Tue, 18 Jun 2019 17:20:11 +0300 Subject: Add endpoint for fetching diverging commit counts Extract diverging_commit_counts into a service class --- config/routes/repository.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config/routes/repository.rb') diff --git a/config/routes/repository.rb b/config/routes/repository.rb index b96315bfe8b..8220b29a401 100644 --- a/config/routes/repository.rb +++ b/config/routes/repository.rb @@ -52,7 +52,10 @@ scope format: false do end get '/branches/:state', to: 'branches#index', as: :branches_filtered, constraints: { state: /active|stale|all/ } - resources :branches, only: [:index, :new, :create, :destroy] + resources :branches, only: [:index, :new, :create, :destroy] do + get :diverging_commit_counts, on: :collection + end + delete :merged_branches, controller: 'branches', action: :destroy_all_merged resources :tags, only: [:index, :show, :new, :create, :destroy] do resource :release, controller: 'tags/releases', only: [:edit, :update] -- cgit v1.2.3