Skip to content

Stop approving Dependabot PRs with GITHUB_TOKEN - #1048

Merged
jeremy merged 1 commit into
mainfrom
actions-drop-dependabot-approval
Nov 21, 2026
Merged

jeremy merged 1 commit into
mainfrom
actions-drop-dependabot-approval

Conversation

@jeremy

@jeremy jeremy commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

The basecamp org is about to turn off "Allow GitHub Actions to create and approve pull requests" (Security Hardening, step 4). After that, gh pr review --approve with GITHUB_TOKEN fails.

This PR deletes the step in dependabot-auto-merge.yml that approves Dependabot's patch and minor bumps with GITHUB_TOKEN. The step that turns on auto-merge stays as it was.

Why the approval can go:

  • main requires no approving review. Read today from GET /repos/basecamp/basecamp-cli/rules/branches/main: every pull_request rule has required_approving_review_count: 0, and the branch has no classic protection. require_extra_approval_for_unattributed_changes applies only to PRs Copilot opens, and GitHub's docs say it "has no effect if the ruleset requires zero approvals."
  • gh pr merge --auto needs contents: write and pull-requests: write, which the job already has. It needs no approval when none is required. Dependabot PRs here already merge as github-actions[bot] through this path.
  • Leaving the step in would break auto-merge after the flip. The step would fail and stop the job, so the auto-merge step would never run.

Nothing else changes: the same update types and ecosystems are auto-merged, and the required checks still gate the merge.


Summary by cubic

Removes the Dependabot approval step that used GITHUB_TOKEN, so auto-merge keeps working after the org disables GitHub Actions from approving pull requests.

  • main requires no approving reviews, so the approval had no effect on merging.
  • The auto-merge step is unchanged and still runs only after required checks pass.

Written for commit 8ee58ab. Summary will update on new commits.

View guided diff Turn on auto-fix

main requires no approving review, so the approval does nothing for the
merge. Once the org stops letting Actions approve pull requests, the step
fails and the job stops before it turns on auto-merge. Auto-merge stays as
it is.
@jeremy
jeremy requested a review from a team as a code owner November 20, 2026 04:50
Copilot AI balanced review requested due to automatic review settings November 20, 2026 04:50
@github-actions

Copy link
Copy Markdown

Sensitive Change Detection (shadow mode)

This PR modifies control-plane files:

  • .github/workflows/dependabot-auto-merge.yml

Shadow mode — this check is informational only. When activated, changes to these paths will require approval from a maintainer.

@github-actions github-actions Bot added the ci CI/CD workflows label Nov 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

No active review issues block the change removing Dependabot’s automated approval step.

No open issues 🎉

What changed in this PR

Removes Dependabot’s GITHUB_TOKEN approval step so auto-merge can continue working after the organization disables approvals by GitHub Actions.

Changes:

  • Deletes the approval step while leaving auto-merge eligibility and vendor-hash refresh prerequisites unchanged.
  • Updates the workflow’s introductory comment to reflect that it only enables auto-merge.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
.github/​workflows/​dependabot-auto-merge.yml Removes automatic approval and updates the description, preserving existing auto-merge behavior.

Review effort: Balanced

@jeremy
jeremy merged commit cb7d787 into main Nov 21, 2026
32 checks passed
@jeremy
jeremy deleted the actions-drop-dependabot-approval branch November 21, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants