diff options
author | sue445 <sue445@sue445.net> | 2014-04-18 00:13:31 +0900 |
---|---|---|
committer | sue445 <sue445@sue445.net> | 2014-05-11 23:50:14 +0900 |
commit | a3d8be09c6c62e39301d82e47b710717ff68245f (patch) | |
tree | f93561c0908a8314ebf2fd802a87808c06761085 | |
parent | 4ba5acd23826831d5db52e66db5238a9030264a3 (diff) | |
download | gitlab-ce-a3d8be09c6c62e39301d82e47b710717ff68245f.tar.gz |
Fix can not automerge if description is too long
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/views/projects/merge_requests/show/_mr_accept.html.haml | 2 | ||||
-rw-r--r-- | config/routes.rb | 2 | ||||
-rw-r--r-- | spec/routing/project_routing_spec.rb | 7 |
4 files changed, 8 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG index e43edc5d7ad..3188b6e9628 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ v 6.9.0 - Improve issue and merge request mobile UI (Drew Blessing) - Document how to convert a backup to PostgreSQL - Fix locale bug in backup manager + - Fix can not automerge when MR description is too long - Fix wiki backup skip bug v 6.8.0 diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml index 6594709f2ae..6ca801b17b9 100644 --- a/app/views/projects/merge_requests/show/_mr_accept.html.haml +++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml @@ -12,7 +12,7 @@ - if @show_merge_controls .automerge_widget.can_be_merged.hide .clearfix - = form_for [:automerge, @project, @merge_request], remote: true, method: :get do |f| + = form_for [:automerge, @project, @merge_request], remote: true, method: :post do |f| %h4 You can accept this request automatically. %div diff --git a/config/routes.rb b/config/routes.rb index 7a33686b810..7641fe43088 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -273,7 +273,7 @@ Gitlab::Application.routes.draw do resources :merge_requests, constraints: {id: /\d+/}, except: [:destroy] do member do get :diffs - get :automerge + post :automerge get :automerge_check get :ci_status end diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb index 97f7392e50a..fa9762625d7 100644 --- a/spec/routing/project_routing_spec.rb +++ b/spec/routing/project_routing_spec.rb @@ -213,7 +213,7 @@ describe Projects::RefsController, "routing" do end # diffs_project_merge_request GET /:project_id/merge_requests/:id/diffs(.:format) projects/merge_requests#diffs -# automerge_project_merge_request GET /:project_id/merge_requests/:id/automerge(.:format) projects/merge_requests#automerge +# automerge_project_merge_request POST /:project_id/merge_requests/:id/automerge(.:format) projects/merge_requests#automerge # automerge_check_project_merge_request GET /:project_id/merge_requests/:id/automerge_check(.:format) projects/merge_requests#automerge_check # branch_from_project_merge_requests GET /:project_id/merge_requests/branch_from(.:format) projects/merge_requests#branch_from # branch_to_project_merge_requests GET /:project_id/merge_requests/branch_to(.:format) projects/merge_requests#branch_to @@ -230,7 +230,10 @@ describe Projects::MergeRequestsController, "routing" do end it "to #automerge" do - get("/gitlab/gitlabhq/merge_requests/1/automerge").should route_to('projects/merge_requests#automerge', project_id: 'gitlab/gitlabhq', id: '1') + post('/gitlab/gitlabhq/merge_requests/1/automerge').should route_to( + 'projects/merge_requests#automerge', + project_id: 'gitlab/gitlabhq', id: '1' + ) end it "to #automerge_check" do |