diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-10 15:41:38 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-10 15:41:38 +0300 |
commit | 3579edba1f0d27095502775c64bdd73a3927dca7 (patch) | |
tree | aab16f576eff2927448e85adc41d2de2b04c566b /app | |
parent | 5324c9364346f74ea73c6be27785704e8e2281f8 (diff) |
Rename ci_commit -> pipeline
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app')
-rw-r--r-- | app/models/merge_request.rb | 2 | ||||
-rw-r--r-- | app/views/projects/merge_requests/widget/_open.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index f919cfe697e..29f36570912 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -493,7 +493,7 @@ class MergeRequest < ActiveRecord::Base def mergeable_ci_state? return true unless project.only_allow_merge_if_build_succeeds? - !ci_commit || ci_commit.success? + !pipeline || pipeline.success? end def state_human_name diff --git a/app/views/projects/merge_requests/widget/_open.html.haml b/app/views/projects/merge_requests/widget/_open.html.haml index 84fbf618ec6..0e0af57d76e 100644 --- a/app/views/projects/merge_requests/widget/_open.html.haml +++ b/app/views/projects/merge_requests/widget/_open.html.haml @@ -17,7 +17,7 @@ = render 'projects/merge_requests/widget/open/merge_when_build_succeeds' - elsif !@merge_request.can_be_merged_by?(current_user) = render 'projects/merge_requests/widget/open/not_allowed' - - elsif !@merge_request.mergeable_ci_state? && @ci_commit && @ci_commit.failed? + - elsif !@merge_request.mergeable_ci_state? && @pipeline && @pipeline.failed? = render 'projects/merge_requests/widget/open/build_failed' - elsif @merge_request.can_be_merged? = render 'projects/merge_requests/widget/open/accept' |