Commit 40f67c1d authored by Rydkin Maxim's avatar Rydkin Maxim

more brief way of get parent commit

parent 67f27a1c
......@@ -40,7 +40,7 @@ describe Ci::CreatePipelineService, services: true do
end
def previous_commit_sha_from_ref(ref)
project.repository.find_commits(ref: ref, max_count: 2)[1].id
project.commit(ref).parent.sha
end
before do
......
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