#465: Fixed: creation of pull requests
This commit is contained in:
parent
e4fdec318f
commit
f9ed845fc7
|
@ -10,7 +10,7 @@ class Projects::PullRequestsController < Projects::BaseController
|
|||
authorize to_project, :show?
|
||||
|
||||
@pull = to_project.pull_requests.new
|
||||
@pull.issue = to_project.issues.new
|
||||
@issue = @pull.issue = to_project.issues.new
|
||||
set_attrs
|
||||
|
||||
authorize @pull
|
||||
|
@ -35,6 +35,7 @@ class Projects::PullRequestsController < Projects::BaseController
|
|||
authorize to_project, :show?
|
||||
|
||||
@pull = to_project.pull_requests.new pull_params
|
||||
@issue = @pull.issue
|
||||
@pull.issue.assignee_id = (params[:issue] || {})[:assignee_id] if policy(to_project).write?
|
||||
@pull.issue.user, @pull.issue.project, @pull.from_project = current_user, to_project, @project
|
||||
@pull.from_project_owner_uname = @pull.from_project.owner.uname
|
||||
|
|
Loading…
Reference in New Issue