Repository navigation
Stop approving Dependabot PRs with GITHUB_TOKEN - #1048
Merged
Merged
Conversation
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.
Sensitive Change Detection (shadow mode)This PR modifies control-plane files:
|
Contributor
There was a problem hiding this comment.
🟢 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 rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
.github/workflows/dependabot-auto-merge.yml |
Removes automatic approval and updates the description, preserving existing auto-merge behavior. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
basecamporg is about to turn off "Allow GitHub Actions to create and approve pull requests" (Security Hardening, step 4). After that,gh pr review --approvewithGITHUB_TOKENfails.This PR deletes the step in
dependabot-auto-merge.ymlthat approves Dependabot's patch and minor bumps withGITHUB_TOKEN. The step that turns on auto-merge stays as it was.Why the approval can go:
mainrequires no approving review. Read today fromGET /repos/basecamp/basecamp-cli/rules/branches/main: everypull_requestrule hasrequired_approving_review_count: 0, and the branch has no classic protection.require_extra_approval_for_unattributed_changesapplies only to PRs Copilot opens, and GitHub's docs say it "has no effect if the ruleset requires zero approvals."gh pr merge --autoneedscontents: writeandpull-requests: write, which the job already has. It needs no approval when none is required. Dependabot PRs here already merge asgithub-actions[bot]through this path.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.mainrequires no approving reviews, so the approval had no effect on merging.Written for commit 8ee58ab. Summary will update on new commits.