File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -72,13 +72,17 @@ jobs:
7272 if [ -n "$pr_number" ]; then
7373 echo "PR from auto/sync-main-pr to main already exists (PR #$pr_number). Exiting gracefully."
7474 else
75- echo "PR does not exist. Creating one..."
76- gh pr create --repo microsoft/codeql --fill -B main -H auto/sync-main-pr \
77- --label 'autogenerated' \
78- --title 'Sync Main (autogenerated)' \
79- --body "This PR syncs the latest changes from \`codeql-cli/latest\` into \`main\`." \
80- --reviewer 'MathiasVP'
81- --reviewer 'ropwareJB'
75+ if git fetch origin main auto/sync-main-pr && [ -n "$(git rev-list origin/main..origin/auto/sync-main-pr)" ]; then
76+ echo "PR does not exist. Creating one..."
77+ gh pr create --repo microsoft/codeql --fill -B main -H auto/sync-main-pr \
78+ --label 'autogenerated' \
79+ --title 'Sync Main (autogenerated)' \
80+ --body "This PR syncs the latest changes from \`codeql-cli/latest\` into \`main\`." \
81+ --reviewer 'MathiasVP'
82+ --reviewer 'ropwareJB'
83+ else
84+ echo "No changes to sync from auto/sync-main-pr to main. Exiting gracefully."
85+ fi
8286 fi
8387 env :
8488 GH_TOKEN : ${{ secrets.WORKFLOW_TOKEN }}
You can’t perform that action at this time.
0 commit comments