summaryrefslogtreecommitdiff
path: root/app/models/commit_status.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-04-16 21:46:26 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-04-16 21:46:26 +0200
commit0b1655e7b2e2aa57cb7ea8401743d709bf246074 (patch)
tree0f2846f32aec86f3d44300649b0c77f179bec0c4 /app/models/commit_status.rb
parent065e0c0fe4e5e16b90c01736721e4c794b71dac9 (diff)
downloadgitlab-ce-0b1655e7b2e2aa57cb7ea8401743d709bf246074.tar.gz
Rename CiStatus to Statusable
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r--app/models/commit_status.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 66eb5dcecf9..06d296eef08 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -33,7 +33,7 @@
#
class CommitStatus < ActiveRecord::Base
- include CiStatus
+ include Statuseable
self.table_name = 'ci_builds'
@@ -81,7 +81,11 @@ class CommitStatus < ActiveRecord::Base
end
end
- delegate :before_sha, :sha, :short_sha, to: :commit, prefix: false
+ delegate :sha, :short_sha, to: :commit
+
+ def before_sha
+ commit.before_sha || Gitlab::Git::BLANK_SHA
+ end
def self.stages
order_by = 'max(stage_idx)'