Skip to content

Commit b64b8fb

Browse files
nolikclaude
andauthored
ci: gate Dependabot auto-merge on github.actor, not PR author (#616)
Fixes "PR is not from Dependabot, nothing to do" from dependabot/fetch-metadata. The job gated on the PR author (always dependabot), so it ran even when a human triggered the event (e.g. clicked "Update branch"); fetch-metadata then checks github.actor, sees the human, and aborts with exit 1. Gating the whole job on `github.actor == 'dependabot[bot]'` (GitHub's documented pattern) means human-triggered events skip cleanly instead of failing. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent cf3fed8 commit b64b8fb

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/dependabot-automerge.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ permissions:
1717
jobs:
1818
auto-merge:
1919
runs-on: ubuntu-latest
20-
# Only act on Dependabot's own PRs.
21-
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
20+
# Only act on events Dependabot itself triggered (opened the PR or rebased
21+
# it). Gating on `github.actor` — not the PR author — matches what
22+
# dependabot/fetch-metadata requires: when a human triggers the event (e.g.
23+
# clicks "Update branch"), github.actor is that human and fetch-metadata
24+
# aborts with "PR is not from Dependabot". Skipping the job avoids that.
25+
if: ${{ github.actor == 'dependabot[bot]' }}
2226
steps:
2327
- name: Fetch Dependabot metadata
2428
id: metadata

0 commit comments

Comments
 (0)