File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,10 @@ jobs:
58
58
GITHUB_TOKEN : ${{ secrets.WORKFLOW_TOKEN }}
59
59
- name : Create or update PR
60
60
run : |
61
- if ! gh pr view -R microsoft/codeql -t 'Sync Main' > /dev/null 2>&1 ; then
62
- gh pr create --repo microsoft/codeql --fill -B main -H sync-main-pr --title 'Sync Main' --body "This PR syncs the latest changes from \`codeql-cli/latest\` into \`main\` ."
61
+ if gh pr list --repo microsoft/codeql --head sync-main-pr --base main --json number --jq '.[0].number' > /dev/null; then
62
+ echo "PR from sync-main-pr to main already exists. Exiting gracefully ."
63
63
else
64
- echo "PR 'Sync Main' already exists ."
64
+ gh pr create --repo microsoft/codeql --fill -B main -H sync-main-pr --title 'Sync Main' --body "This PR syncs the latest changes from \`codeql-cli/latest\` into \`main\` ."
65
65
fi
66
66
env :
67
67
GH_TOKEN : ${{ secrets.WORKFLOW_TOKEN }}
You can’t perform that action at this time.
0 commit comments