Commit 9d6d4cad authored by Timo Koch's avatar Timo Koch
Browse files

[ci] Only search for merge commits with git

parent 8358d93b
......@@ -105,8 +105,8 @@ elif args['look_for'] == 'latest':
elif args['look_for'] == 'latest-merge':
count = args['max_tree_depth']
commits = filter(None, runCommand(f'git rev-list HEAD --max-count={count}').split('\n'))
pipeLine = findPipeline(filter(lambda c: isMergeCommit(c)), commits)
commits = filter(None, runCommand(f'git rev-list HEAD --merges --max-count={count}').split('\n'))
pipeLine = findPipeline(commits)
if pipeLine is not None:
if args['print_format'] == 'pipeline-id':
......
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