Skip to content

Commit 309539c

Browse files
darkobas2claude
andauthored
ci(auto-assign-author): skip bot/agent PR authors (#5533)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 03f28b5 commit 309539c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/auto-assign-author.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ jobs:
1616
runs-on: ubuntu-latest
1717
# Only internal-branch PRs (fork PRs get a read-only token and their author
1818
# isn't a collaborator, so assignment can't apply), and only when the author
19-
# left it unassigned.
20-
if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.assignees[0] == null
19+
# left it unassigned. Skip bot/agent authors: assigning an agent (e.g. a
20+
# Copilot coding-agent PR) requires a user token, which GITHUB_TOKEN is not.
21+
if: >-
22+
github.event.pull_request.head.repo.full_name == github.repository
23+
&& github.event.pull_request.assignees[0] == null
24+
&& github.event.pull_request.user.type != 'Bot'
2125
steps:
2226
- uses: actions/github-script@v7
27+
continue-on-error: true
2328
with:
2429
script: |
2530
await github.rest.issues.addAssignees({

0 commit comments

Comments
 (0)