summaryrefslogtreecommitdiff
path: root/app/models/commit_status.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r--app/models/commit_status.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index bb74ff2c5f6..e437e3417a8 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -8,6 +8,8 @@ class CommitStatus < ActiveRecord::Base
belongs_to :pipeline, class_name: 'Ci::Pipeline', foreign_key: :commit_id, touch: true
belongs_to :user
+ delegate :commit, to: :pipeline
+
validates :pipeline, presence: true, unless: :importing?
validates_presence_of :name
@@ -90,12 +92,4 @@ class CommitStatus < ActiveRecord::Base
def stuck?
false
end
-
- ##
- # Deprecated, this should be removed in 9.0 in favor of exposing
- # entire pipeline in API.
- #
- def commit
- pipeline.try(:commit_data)
- end
end