Read about our upcoming Code of Conduct on this issue

Commit 1aba3a5c authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Unify pipeline_for(ref, nil) and pipeline_for(ref), feedback:
parent 3cd864f1a30e
......@@ -1094,8 +1094,11 @@ def allowed_to_share_with_group?
def pipeline_for(ref, sha = commit(ref).try(:sha))
def pipeline_for(ref, sha = nil)
sha ||= commit(ref).try(:sha)
return unless sha
pipelines.order(id: :desc).find_by(sha: sha, ref: ref)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment