diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-20 18:06:04 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-20 18:06:04 +0000 |
commit | fdffdcf1abaa2cab903f1d32610eb562cdf53906 (patch) | |
tree | de74d5ee1319ebb62faacfd841a98acf3737901d /app/models/commit_status.rb | |
parent | 97b63407ef0ecacc239fe320a9b87eefdebfe70c (diff) | |
download | gitlab-ce-fdffdcf1abaa2cab903f1d32610eb562cdf53906.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 39a6247b3b2..4929c773eb8 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -17,7 +17,7 @@ class CommitStatus < ApplicationRecord belongs_to :auto_canceled_by, class_name: 'Ci::Pipeline' delegate :commit, to: :pipeline - delegate :sha, :short_sha, to: :pipeline + delegate :sha, :short_sha, :before_sha, to: :pipeline validates :pipeline, presence: true, unless: :importing? validates :name, presence: true, unless: :importing? @@ -176,10 +176,6 @@ class CommitStatus < ApplicationRecord will_save_change_to_status? end - def before_sha - pipeline.before_sha || Gitlab::Git::BLANK_SHA - end - def group_name name.to_s.gsub(%r{\d+[\s:/\\]+\d+\s*}, '').strip end |