Skip to content
Snippets Groups Projects
Commit 9d6d4cad authored by Timo Koch's avatar Timo Koch
Browse files

[ci] Only search for merge commits with git

parent 8358d93b
No related branches found
No related tags found
1 merge request!2659[ci] make pipeline search more robust
...@@ -105,8 +105,8 @@ elif args['look_for'] == 'latest': ...@@ -105,8 +105,8 @@ elif args['look_for'] == 'latest':
elif args['look_for'] == 'latest-merge': elif args['look_for'] == 'latest-merge':
count = args['max_tree_depth'] count = args['max_tree_depth']
commits = filter(None, runCommand(f'git rev-list HEAD --max-count={count}').split('\n')) commits = filter(None, runCommand(f'git rev-list HEAD --merges --max-count={count}').split('\n'))
pipeLine = findPipeline(filter(lambda c: isMergeCommit(c)), commits) pipeLine = findPipeline(commits)
if pipeLine is not None: if pipeLine is not None:
if args['print_format'] == 'pipeline-id': if args['print_format'] == 'pipeline-id':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment