Skip to content

Commit 926b5db

Browse files
committed
ci: skip auto-assign for bot-authored pull requests
GitHub cannot assign bot accounts, so every Dependabot PR made the Auto Assign PR workflow POST {"assignees":["dependabot[bot]"]} and receive 403 Forbidden, leaving a failing check unrelated to the change under review. Guard the job on the author type so it runs only for human authors, and grant `issues: write` — addAssignees belongs to the issues API and was not covered by the existing `pull-requests: write` grant.
1 parent 9beb8b4 commit 926b5db

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/auto-assign.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ on:
55
types: [opened]
66

77
permissions:
8+
issues: write
89
pull-requests: write
910

1011
jobs:
1112
assign:
13+
# Bot accounts (dependabot[bot] and friends) cannot be assigned; the API
14+
# rejects them with 403, which failed this workflow on every automated PR.
15+
if: github.event.pull_request.user.type != 'Bot'
1216
runs-on: ubuntu-latest
1317
steps:
1418
- name: Assign PR to author

0 commit comments

Comments
 (0)