feat(ci): auto-approve Dependabot patch-level bumps - #42508
Open
rusackas wants to merge 2 commits into
Open
Conversation
Posts an approving review (via dependabot/fetch-metadata's update-type output) on Dependabot PRs that only bump a patch version. Scoped to patch only, per the original ask; minor/major bumps get no automated review and go through normal human review as before. This does NOT enable auto-merge. Checked before building anything: - allow_auto_merge is false at the repo level (confirmed via API) - GitHub's native auto-merge feature is off repo-wide, and flipping that is a separate, consequential, repo-wide settings decision, not something this workflow does on its own. - Branch protection (.asf.yaml) requires require_code_owner_reviews plus 1 approving review. Checked .github/CODEOWNERS against every path Dependabot actually opens PRs against (superset-frontend/, docs/, superset-websocket/ x2, pip at /) - none match any CODEOWNERS pattern, so a bot-posted approval satisfies the plain 1-approval requirement for those, same as GitHub's own documented fetch-metadata + `gh pr review --approve` recipe for repos with required reviews. One exception: the npm ecosystem scoped to .github/actions matches the /.github/ CODEOWNERS entry, so those PRs still need a human owner's approval regardless - this workflow posts a review there too, but it won't satisfy the code-owner requirement alone. Trigger/guard convention copied directly from the existing sync-requirements-for-python-dep-upgrade-pr.yml (plain `pull_request`, not `pull_request_target`): confirmed empirically via that workflow's own run history that a plain `pull_request` trigger gets a working, write-capable GITHUB_TOKEN for genuine Dependabot-authored PRs on this repo (Dependabot pushes branches directly to apache/superset, not a fork), rather than assuming pull_request_target was required. Pinned to dependabot/fetch-metadata v3.1.0 (25dd0e34f4fe68f24cc83900b1fe3fe149efef98); needs the same ASF Infra allowlist ticket as the other recent action additions before it can run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rusackas
requested review from
betodealmeida,
dpgaspar,
eschutho,
geido,
hainenber,
kgabryje,
mistercrunch,
nytai,
sadpandajoe,
sha174n and
villebro
as code owners
July 28, 2026 05:28
Contributor
|
Bito Automatic Review Skipped - Files Excluded |
Checked apache/infrastructure-actions' approved_patterns.yml directly: dependabot/fetch-metadata@25dd0e34... (the exact SHA pinned here) is already present, so this workflow doesn't need an Infra ticket to run. Tightens the comment to say so instead of the more hedged "will need a ticket" framing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rusackas
commented
Jul 28, 2026
rusackas
left a comment
Member
Author
There was a problem hiding this comment.
Let's make it npm only if possible
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.
SUMMARY
Adds a workflow that auto-approves Dependabot PRs bumping a dependency by a patch version only, using
dependabot/fetch-metadata'supdate-typeoutput. Minor and major bumps get no automated review — normal human review as today.This was originally suggested as "gate auto-approve/auto-merge on patch-level bumps." I checked before building anything, and auto-merge doesn't hold up as suggested — see below. What's in this PR is the auto-approve half only, scoped down deliberately.
Why not auto-merge too
allow_auto_mergeisfalseat the repo level (confirmed via the API) — GitHub's native auto-merge is switched off repo-wide. Enabling it is a separate, repo-wide settings decision (affects every PR, not just Dependabot's) that this workflow doesn't make on its own..asf.yaml) requiresrequire_code_owner_reviews: trueplus 1 approving review. I checked.github/CODEOWNERSagainst every path Dependabot actually opens PRs against (superset-frontend/,docs/,superset-websocket/×2, andpipat/) — none match any CODEOWNERS pattern, so a bot-posted approval satisfies the plain 1-approval requirement for those, the same way GitHub's own documentedfetch-metadata+gh pr review --approverecipe works for repos with required reviews. One exception: thenpmecosystem scoped to.github/actionsmatches the/.github/CODEOWNERS entry — those PRs will still need a real human owner's approval no matter what this workflow does. It posts a review there too (harmless), but it won't satisfy the code-owner requirement alone.So: for most of the actual Dependabot PR volume, this should get the review requirement out of the way before a human ever opens the PR, but merging is still a manual click same as today — auto-merge would need someone to deliberately flip the repo setting, which felt like a decision for a maintainer to make explicitly rather than something to bundle into this PR.
Trigger choice
Uses a plain
pull_requesttrigger (types:opened,synchronize), notpull_request_target. I'd assumed Dependabot-triggeredpull_requestevents get a read-only token regardless of thepermissions:block (a real, commonly-cited GitHub Actions restriction) and almost built this aroundpull_request_targetto work around it — but this repo's ownsync-requirements-for-python-dep-upgrade-pr.ymlalready does agit push(needscontents: write) under a plainpull_requesttrigger for genuine Dependabot PRs, and I checked its actual run history/logs to confirm that push step succeeds today. Copied that same proven trigger/guard convention here instead of assuming the more complex trigger was necessary.Allowlist status
dependabot/fetch-metadata@25dd0e34...(the exact SHA pinned here) is already on ASF Infra's action allowlist — checkedapache/infrastructure-actions'approved_patterns.ymldirectly rather than assume. No Infra ticket needed for this PR to run.TESTING INSTRUCTIONS
npm/pipecosystems except.github/actions) and confirm it picks up an approving review automatically..github/actionsnpm scope still shows as needing review (the bot's approval alone shouldn't satisfy the code-owner gate there).ADDITIONAL INFORMATION
🤖 Generated with Claude Code