Adjust code review findings (string escaping)

This commit is contained in:
Tamas Vajk
2021-06-29 08:45:13 +02:00
parent 006303420b
commit 513482b4d5

View File

@@ -122,7 +122,7 @@ def get_previous_run_id(repo, run_id, pr_number):
# Get all previous runs that match branch, repo and workflow name:
output = utils.subprocess_check_output(["gh", "api", "-X", "GET", f"repos/{repo}/actions/runs", "-f", "event=pull_request", "-f", "status=success", "-f", f"branch='{pr_branch}'", "--paginate",
"--jq", f"[.workflow_runs.[] | select(.head_repository.full_name==\"{pr_repo}\" and .name==\"{artifacts_workflow_name}\")] | sort_by(.id) | reverse | [.[].id]"])
"--jq", f'[.workflow_runs.[] | select(.head_repository.full_name=="{pr_repo}" and .name=="{artifacts_workflow_name}")] | sort_by(.id) | reverse | [.[].id]'])
ids = []
for l in [json.loads(l) for l in output.splitlines()]: