diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-12 12:16:00 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-12 12:42:27 +0200 |
commit | 0aefeeb882b40d740b80f15ac6610a88a340d30b (patch) | |
tree | 5dcf22ccfd0b7222529f6d74b3e05c2dc2fb2493 /app/models | |
parent | 7ef156a24292f98d89bc424cc245f00548831863 (diff) | |
download | gitlab-ce-0aefeeb882b40d740b80f15ac6610a88a340d30b.tar.gz |
Add Commit Status documentation
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/commit.rb | 2 | ||||
-rw-r--r-- | app/models/commit_status.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index 042a68681bb..623ff619c49 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -136,7 +136,7 @@ module Ci latest_statuses = statuses.latest.to_a latest_statuses.reject! { |status| status.try(&:allow_failure?) } - latest_statuses.select! { |status| status.ref == nil || status.ref == ref } if ref + latest_statuses.select! { |status| status.ref.nil? || status.ref == ref } if ref if latest_statuses.none? return 'skipped' diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index de7b29a649d..a4896a76316 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -5,7 +5,7 @@ class CommitStatus < ActiveRecord::Base belongs_to :user validates :commit, presence: true - validates :status, inclusion: {in: %w(pending running failed success canceled)} + validates :status, inclusion: { in: %w(pending running failed success canceled) } validates_presence_of :name |