diff --git a/app/controllers/pull_requests_controller.rb b/app/controllers/pull_requests_controller.rb index cc5a7a052..214bfc2dd 100644 --- a/app/controllers/pull_requests_controller.rb +++ b/app/controllers/pull_requests_controller.rb @@ -1,6 +1,6 @@ class PullRequestsController < ApplicationController before_filter :find_project_and_repository - before_filter :connect_gitlab, :only => [:index, :show, :create, :accept_pull_request, :pull_request_commits, :pull_request_changes] + before_filter :connect_gitlab, :only => [:index, :show, :create, :accept_pull_request, :pull_request_commits, :pull_request_changes, :new] layout "base_projects" # 返回json格式 @@ -21,6 +21,7 @@ class PullRequestsController < ApplicationController end def new + @rev = @g.branches(@project.gpid).map{|b| b.name} end # Creates a merge request. diff --git a/app/views/pull_requests/_form.html.erb b/app/views/pull_requests/_form.html.erb index 5248325e1..ff840c800 100644 --- a/app/views/pull_requests/_form.html.erb +++ b/app/views/pull_requests/_form.html.erb @@ -8,9 +8,13 @@