diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-03 23:39:37 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-03 23:39:37 +0800 |
commit | 1ae557c106e94c20742d0788dc7eb604603faa08 (patch) | |
tree | 5a3fb7c52bf5d733fd3e69765098a040884a48cc /app/models/commit.rb | |
parent | ee4c8b75de6b04a8c2ed755b1b409dab9f0536c5 (diff) | |
download | gitlab-ce-1ae557c106e94c20742d0788dc7eb604603faa08.tar.gz |
Merge status_for and status, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17742297
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 20bb93f4663..1fbda6f6acc 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -230,11 +230,7 @@ class Commit project.pipelines.where(sha: sha) end - def status - status_for(nil) - end - - def status_for(ref) + def status(ref = nil) if @statuses.key?(ref) @statuses[ref] elsif ref |