Skip to content

Commit 3d57ea9

Browse files
authored
Update sync-main.yml
1 parent 98338fe commit 3d57ea9

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.github/workflows/sync-main.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ jobs:
2929
run: |
3030
git config user.name "github-actions[bot]"
3131
git config user.email "github-actions[bot]@users.noreply.github.com"
32-
git checkout -B sync-main-pr origin/sync-main-pr
32+
git checkout -B auto/sync-main-pr origin/auto/sync-main-pr
3333
- name: Sync origin/main
3434
shell: bash
3535
run: |
3636
echo "::group::Sync with main branch"
37-
git pull origin sync-main-pr; exitCode=$?; if [ $exitCode -ne 0 ]; then exitCode=0; fi
37+
git pull origin auto/sync-main-pr; exitCode=$?; if [ $exitCode -ne 0 ]; then exitCode=0; fi
3838
git pull origin main
39-
git push --force origin sync-main-pr
39+
git push --force origin auto/sync-main-pr
4040
echo "::endgroup::"
4141
- name: Sync upstream/codeql-cli/latest
4242
shell: bash
@@ -52,18 +52,15 @@ jobs:
5252
echo "::endgroup::"
5353
- name: Push sync branch
5454
run: |
55-
git push origin sync-main-pr
55+
git push origin auto/sync-main-pr
5656
env:
5757
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
58-
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
5958
- name: Create or update PR
6059
run: |
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."
60+
if gh pr list --repo microsoft/codeql --head auto/sync-main-pr --base main --json number --jq '.[0].number' > /dev/null; then
61+
echo "PR from auto/sync-main-pr to main already exists. Exiting gracefully."
6362
else
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\`."
63+
gh pr create --repo microsoft/codeql --fill -B main -H auto/sync-main-pr --label 'autogenerated' --title 'Sync Main (autogenerated)' --body "This PR syncs the latest changes from \`codeql-cli/latest\` into \`main\`."
6564
fi
6665
env:
6766
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
68-
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
69-

0 commit comments

Comments
 (0)