Repository navigation
Conversation
|
👋 kalverra, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
🦋 Changeset is good to goLatest commit: b25b171 We got this. Not sure what this means? Click here to learn what changesets are. |
There was a problem hiding this comment.
🔵 Needs a closer look
Executing PR-controlled commands with write credentials requires a human security review of the trust boundary.
6 open findings
Isolate write credentials from untrusted PR code · New Validate PR head SHA before detecting or committing changes · New Expose private dependency credentials through an explicit interface · New Skip enhancement when setup fails · New Treat an already-pushed enhancement as a successful retry · New Report the successful retry commit SHA · New
What changed in this PR
This PR adds a versioned reusable workflow for running repository-specific setup and generation on Dependabot PRs, then committing the resulting changes.
Changes:
- Adds checkout, enhancement, push retry, and failure reporting.
- Documents consumer setup and prepares the workflow for release.
| File | Description |
|---|---|
workflows/enhance-dependabot/README.md |
Documents the reusable workflow and its inputs. |
workflows/enhance-dependabot/package.json |
Adds release package metadata. |
workflows/enhance-dependabot/enhance-dependabot.yml |
Implements the workflow. |
workflows/enhance-dependabot/CHANGELOG.md |
Starts the changelog. |
.github/workflows/enhance-dependabot.yml |
Publishes the generated workflow. |
.changeset/lucky-pumas-enhance.md |
Declares the initial release. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🔵 Needs a closer look
Running PR-controlled code with write credentials needs a human-reviewed trust boundary.
3 open findings
6 resolved since last review
Validate PR head SHA before detecting or committing changes Isolate write credentials from untrusted PR code Report the successful retry commit SHA Treat an already-pushed enhancement as a successful retry Skip enhancement when setup fails Expose private dependency credentials through an explicit interface
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
🧠 Review effort: Lite
…83/enhance-dependabot
92e9b78 to
6a86d0e
Compare


Intent
Dependabot PRs stay unmergeable when follow-up steps (
go mod tidy, codegen, formatting) must run after a bump;enhance-dependabotruns a repo-defined command on the PR head, commits the result, and pushes it back to the Dependabot branch so the usual PR checks re-run on merge-ready code.Notes
pull_request_targetgated ongithub.actor == 'dependabot[bot]'and check outgithub.event.pull_request.head.shawithpersist-credentials: false;validate.shenforces all of it (actor, in-repodependabot/*branch, HEAD, no persisted credentials) and fails closed.push-token:GITHUB_TOKENpushes do not trigger workflow runs. Credential isolation from the enhance command is best-effort (same job); see Known tradeoffs.@dependabot rebaseis refused (non-Dependabot commits); use@dependabot recreate.Usage
A consumer repository adds
.github/workflows/enhance-dependabot.yml(full options in the README):Changes
Enhancement flow from PR trigger to push:
Push ignores git config and hooks planted by the enhance command
push.shdropslocal
url/http/credential/includeconfig, ignores global/systemconfig, and disables hooks before pushing.
A moved branch supersedes the run instead of replaying stale output
push.shexits 0with
result=superseded; the README example adds a per-PRconcurrencygroup.Guard and push scripts are unit tested
test.shruns both scriptsagainst throwaway git fixtures and a local bare remote
(
pnpm --filter enhance-dependabot test).Consumer docs, outputs, and release metadata
README.mdcovers the consumerworkflow (App token, read-only job token), grouping, and tradeoffs.
changedandcommit-sha(set onlywhen pushed); major-release
changeset.
Merge Danger
actions/enhance-dependabot/; opt-in per repository.