Repository navigation
Description
What
With #288 fixed, .github/dependabot.yml became valid and Dependabot immediately re-evaluated it, opening 14 PRs across ecosystems it had never touched. The automerge label arrived on every one of them — the label plumbing works now.
And the auto-merge workflow still merges nothing, because the step now runs and fails:
failed to create review: GraphQL: GitHub Actions is not permitted to approve pull requests. (addPullRequestReview)
##[error]Process completed with exit code 1.
repos/scttfrdmn/objectfs/actions/permissions/workflow reports can_approve_pull_request_reviews: false.
The step body is two commands:
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"It runs under bash -e, so the failing first line aborts before the second one runs. The command that actually does the work was never reached.
Why this only surfaced now
This is the fifth independent cause of "46 Dependabot PRs opened, 0 merged," and each earlier one hid it:
| # | cause | why it hid the next |
|---|---|---|
| 1 | automerge label didn't exist; Dependabot drops unknown labels silently |
step was skipped, so nothing downstream could fail |
| 2 | repository auto-merge was disabled | would have failed the merge command |
| 3 | check-regexp: (test|lint|security).* matched 2 of 8 jobs |
wait step never covered the real checks |
| 4 | .github/dependabot.yml invalid → labels: never applied (#288) |
made the fix for (1) inert; step still skipped |
| 5 | this — Actions can't approve; bash -e aborts the step |
only reachable once the step stopped being skipped |
Causes 1 and 4 both kept the if: condition false, so the step never executed and cause 5 could not produce a symptom. It became visible within minutes of #289 merging.
The fix
Delete the gh pr review --approve line. It was never needed: branch protection on main has required_pull_request_reviews: null — status checks are required, reviews are not. Nothing is waiting on an approval.
The alternative — enabling "Allow GitHub Actions to create and approve pull requests" — would grant every workflow in the repository the ability to satisfy a review requirement, in order to buy something no rule is asking for. Not worth it.
Verification
The honest verification for this one is the next Dependabot PR, not a unit test: the failure is a repository permission interacting with a shell flag, and neither is reachable from Go. What can be checked here is that the step no longer contains the approve command, and the five causes are now documented in the workflow header so the next person does not rediscover them one at a time.
Worth watching on the next minor/patch Dependabot PR: the dependabot check should go green and the PR should show "auto-merge enabled."
Activity
fix(ci): drop the approve step — Actions can't approve, and bash -e a…
Merge origin/main into ci/action-majors