From 552b79ec9582a44a3c389859f06f7e82722dfee8 Mon Sep 17 00:00:00 2001 From: Not Darko <93942788+darkobas2@users.noreply.github.com> Date: Thu, 9 Jul 2026 14:32:39 +0200 Subject: [PATCH] ci(auto-assign-author): skip bot/agent PR authors addAssignees fails for agent/bot authors (e.g. Copilot coding-agent PRs) with 'Assigning agents is not supported with GitHub App installation tokens' because the workflow uses GITHUB_TOKEN. The workflow only needs to assign human authors, so guard on user.type != 'Bot'; also make the step continue-on-error so this cosmetic assignment can never fail CI. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/auto-assign-author.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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({