From 6afea3bbffa486669cc589461a186b02f7636d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de> Date: Tue, 1 Jun 2021 19:01:29 +0200 Subject: [PATCH] [ci] use generator over list --- .gitlab-ci/getpipelineinfo.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci/getpipelineinfo.py b/.gitlab-ci/getpipelineinfo.py index 6cbbaa4fce..f9dfffda19 100644 --- a/.gitlab-ci/getpipelineinfo.py +++ b/.gitlab-ci/getpipelineinfo.py @@ -103,8 +103,7 @@ elif args['look_for'] == 'latest': elif args['look_for'] == 'latest-merge': commits = runCommand('git rev-list HEAD').split('\n') - commits = [c for c in commits if isMergeCommit(c)] - pipeLine = findPipeline(commits) + pipeLine = findPipeline(filter(lambda c: isMergeCommit(c), commits)) if pipeLine is not None: if args['print_format'] == 'pipeline-id': -- GitLab