diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-28 03:12:12 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-28 03:12:12 +0800 |
commit | f4b9de38edb3152888cb8e9ea0f9e48a6f08dd26 (patch) | |
tree | dc1bbced646ee9350b273015d6ab667416ae0105 /app/models/commit.rb | |
parent | fb19d9f4e2c552ac81c9ff0e8aaff6f0e0686fc3 (diff) | |
download | gitlab-ce-f4b9de38edb3152888cb8e9ea0f9e48a6f08dd26.tar.gz |
It's not used as a public API right now, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17522443
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 337b7445b46..20bb93f4663 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -51,7 +51,6 @@ class Commit end attr_accessor :raw - attr_reader :statuses def initialize(raw_commit, project) raise "Nil as raw commit passed" unless raw_commit @@ -236,12 +235,12 @@ class Commit end def status_for(ref) - if statuses.key?(ref) - statuses[ref] + if @statuses.key?(ref) + @statuses[ref] elsif ref - statuses[ref] = pipelines.where(ref: ref).status + @statuses[ref] = pipelines.where(ref: ref).status else - statuses[ref] = pipelines.status + @statuses[ref] = pipelines.status end end |