Merge pull request #676 from warpc/90-pull-fixes
[refs #90] fix creating & updating pulls
This commit is contained in:
commit
1bf0f07297
|
@ -47,7 +47,7 @@ class Projects::PullRequestsController < Projects::BaseController
|
|||
flash.now[:error] = I18n.t('projects.pull_requests.up_to_date', :to_ref => @pull.to_ref, :from_ref => @pull.from_ref)
|
||||
render :new
|
||||
else
|
||||
@pull.send(@pull.status)
|
||||
@pull.send(@pull.status == 'blocked' ? 'block' : @pull.status)
|
||||
redirect_to project_pull_request_path(@pull.to_project, @pull)
|
||||
end
|
||||
else
|
||||
|
|
|
@ -71,7 +71,7 @@ class ActivityFeedObserver < ActiveRecord::Observer
|
|||
|
||||
when 'GitHook'
|
||||
return unless record.project
|
||||
record.project.pull_requests.needed_checking.each {|pull| pull.check}
|
||||
PullRequest.where("from_project_id = ? OR to_project_id = ?", record.project, record.project).needed_checking.each {|pull| pull.check}
|
||||
|
||||
change_type = record.change_type
|
||||
branch_name = record.refname.split('/').last
|
||||
|
|
Loading…
Reference in New Issue