diff --git a/.github/workflows/auto-assign-author.yml b/.github/workflows/auto-assign-author.yml index ec3bcd54e43..daf0d7c50a6 100644 --- a/.github/workflows/auto-assign-author.yml +++ b/.github/workflows/auto-assign-author.yml @@ -16,10 +16,15 @@ jobs: runs-on: ubuntu-latest # Only internal-branch PRs (fork PRs get a read-only token and their author # isn't a collaborator, so assignment can't apply), and only when the author - # left it unassigned. - if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.assignees[0] == null + # left it unassigned. Skip bot/agent authors: assigning an agent (e.g. a + # Copilot coding-agent PR) requires a user token, which GITHUB_TOKEN is not. + if: >- + github.event.pull_request.head.repo.full_name == github.repository + && github.event.pull_request.assignees[0] == null + && github.event.pull_request.user.type != 'Bot' steps: - uses: actions/github-script@v7 + continue-on-error: true with: script: | await github.rest.issues.addAssignees({