From adb3670455f0b252a442a3ba17968678f24f9512 Mon Sep 17 00:00:00 2001 From: Julio Quinteros Pro Date: Thu, 19 Feb 2026 21:16:52 -0300 Subject: [PATCH] fix(ci): drop PAT approval, use github.token for auto-merge only PAT_TOKEN_2 does not have the scope required for PR reviews (addPullRequestReview). Since github.token cannot approve its own PR, drop the approval step entirely and just enable auto-merge. If branch protection requires a review the PR will still be created and auto-merged as soon as a maintainer approves it. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/regenerate-poetry-lock.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/regenerate-poetry-lock.yml b/.github/workflows/regenerate-poetry-lock.yml index fca6c31eb61..1d79211bb91 100644 --- a/.github/workflows/regenerate-poetry-lock.yml +++ b/.github/workflows/regenerate-poetry-lock.yml @@ -72,12 +72,9 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Approve and enable auto-merge + - name: Enable auto-merge if: steps.diff.outputs.changed == 'true' run: | - # Approve with PAT_TOKEN_2 (a different identity from the creator, - # since GitHub does not allow a token to approve its own PR). - gh pr review "${{ steps.open-pr.outputs.pr_url }}" --approve - gh pr merge "${{ steps.open-pr.outputs.pr_url }}" --auto --squash + gh pr merge "${{ steps.open-pr.outputs.pr_url }}" --auto --squash env: - GH_TOKEN: ${{ secrets.PAT_TOKEN_2 }} + GH_TOKEN: ${{ github.token }}