diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-21 16:22:43 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-24 22:26:06 +0800 |
commit | 5416d0e0837f69f35a3a9deaf947fd62e5293661 (patch) | |
tree | 464b29e773327e213a035131ee0f8f2c770f0fd7 /app/models/commit.rb | |
parent | 4028022f56f81f9cbe1227dae53c878f702bd8fa (diff) | |
download | gitlab-ce-5416d0e0837f69f35a3a9deaf947fd62e5293661.tar.gz |
Pass `@ref` along so we know which pipeline to show
Closes #23615
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index e64fd1e0c1b..02e06657306 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -225,6 +225,10 @@ class Commit ) end + def pipelines_for(ref) + project.pipelines.where(sha: sha, ref: ref) + end + def pipelines @pipeline ||= project.pipelines.where(sha: sha) end |