GitLab wurde aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Vielen Dank für Ihre Geduld.

Commit be0ce05c authored by Kamil Trzciński's avatar Kamil Trzciński
Browse files

Merge branch 'ci-pipeline-commit-lookup' into 'master'

Use porcelain commit lookup method on CI::CreatePipelineService

Closes charts/helm.gitlab.io#291

See merge request gitlab-org/gitlab-ce!17911
parents 5c36e1b9 04b8e00f
......@@ -65,7 +65,7 @@ def auto_cancelable_pipelines
project.pipelines
.where(ref: pipeline.ref)
.where.not(id: pipeline.id)
.where.not(sha: project.repository.sha_from_ref(pipeline.ref))
.where.not(sha: project.commit(pipeline.ref).try(:id))
.created_or_pending
end
......
---
title: Use porcelain commit lookup method on CI::CreatePipelineService
merge_request: 17911
author:
type: fixed
......@@ -516,10 +516,6 @@ def count_commits(options)
end
end
def sha_from_ref(ref)
rev_parse_target(ref).oid
end
# Return the object that +revspec+ points to. If +revspec+ is an
# annotated tag, then return the tag's target instead.
def rev_parse_target(revspec)
......@@ -2409,6 +2405,10 @@ def rugged_commit_count(ref)
def rev_list_param(spec)
spec == :all ? ['--all'] : spec
end
def sha_from_ref(ref)
rev_parse_target(ref).oid
end
end
end
end
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