diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-06-02 12:16:11 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-06-02 12:16:11 +0200 |
commit | fe0b2f81c7c9680a11288e0cdffc3e80dc1e8d58 (patch) | |
tree | fd19bea3c1118cb7438f0d2476bad322ccb5c421 /app/models/commit_status.rb | |
parent | aa0d6b07b6a87459e75c69111643b9d6fe8a97c2 (diff) | |
download | gitlab-ce-fe0b2f81c7c9680a11288e0cdffc3e80dc1e8d58.tar.gz |
Refine implementation of pipeline stage seeds
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index fe63728ea23..82f6ce8e484 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -5,10 +5,10 @@ class CommitStatus < ActiveRecord::Base self.table_name = 'ci_builds' + belongs_to :user belongs_to :project belongs_to :pipeline, class_name: 'Ci::Pipeline', foreign_key: :commit_id belongs_to :auto_canceled_by, class_name: 'Ci::Pipeline' - belongs_to :user delegate :commit, to: :pipeline delegate :sha, :short_sha, to: :pipeline @@ -18,7 +18,7 @@ class CommitStatus < ActiveRecord::Base validates :name, presence: true alias_attribute :author, :user - + scope :failed_but_allowed, -> do where(allow_failure: true, status: [:failed, :canceled]) end |