diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 6a18cbd46..61b583c68 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -90,15 +90,16 @@ jobs: if [ -n "$PR_NUMBER" ]; then gh pr review $PR_NUMBER --approve fi - - - name: Re-approve pull request after update + + - name: Approve pull request and merge if: env.changed == 'true' env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.PAT_AUTOMERGE }} run: | PR_NUMBER=$(gh pr list --head "pr-update-app-files" --json number --jq '.[].number') if [ -n "$PR_NUMBER" ]; then gh pr review $PR_NUMBER --approve + gh pr merge $PR_NUMBER --squash --admin fi # Step 8: Output success message when no changes diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index 6bf7855bd..f441bce63 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -264,6 +264,17 @@ jobs: gh pr review $PR_NUMBER --approve fi + - name: Approve pull request and merge + if: env.changed == 'true' + env: + GH_TOKEN: ${{ secrets.PAT_AUTOMERGE }} + run: | + PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number') + if [ -n "$PR_NUMBER" ]; then + gh pr review $PR_NUMBER --approve + gh pr merge $PR_NUMBER --squash --admin + fi + - name: Re-approve pull request after update if: env.changed == 'true' env: diff --git a/.github/workflows/crawl-versions.yaml b/.github/workflows/crawl-versions.yaml index 14e5c548a..91e3667c3 100644 --- a/.github/workflows/crawl-versions.yaml +++ b/.github/workflows/crawl-versions.yaml @@ -104,6 +104,17 @@ jobs: gh pr review $PR_NUMBER --approve fi + - name: Approve pull request and merge + if: env.changed == 'true' + env: + GH_TOKEN: ${{ secrets.PAT_AUTOMERGE }} + run: | + PR_NUMBER=$(gh pr list --head "update_versions" --json number --jq '.[].number') + if [ -n "$PR_NUMBER" ]; then + gh pr review $PR_NUMBER --approve + gh pr merge $PR_NUMBER --squash --admin + fi + - name: Re-approve pull request after update if: env.changed == 'true' env: diff --git a/.github/workflows/update-json-date.yml b/.github/workflows/update-json-date.yml index 8bdc36ca5..2004f1522 100644 --- a/.github/workflows/update-json-date.yml +++ b/.github/workflows/update-json-date.yml @@ -126,6 +126,16 @@ jobs: if [ -n "$PR_NUMBER" ]; then gh pr review $PR_NUMBER --approve fi + - name: Approve pull request and merge + if: env.changed == 'true' + env: + GH_TOKEN: ${{ secrets.PAT_AUTOMERGE }} + run: | + PR_NUMBER=$(gh pr list --head "${{ env.BRANCH_NAME }}" --json number --jq '.[].number') + if [ -n "$PR_NUMBER" ]; then + gh pr review $PR_NUMBER --approve + gh pr merge $PR_NUMBER --squash --admin + fi - name: No changes detected if: env.changed == 'false'