v1.1.0 — dependabot-keep-current reusable (auto-rebase blocked Dependabot PRs) - #6
Conversation
Rebases Dependabot PRs that are BLOCKED by being out of date (mergeStateStatus BEHIND/DIRTY) when a merge lands on their base — retires the manual '@dependabot rebase'. Mechanical (no AI): posts the rebase command as the driver-digital-agents user (Dependabot ignores App/github-actions[bot] commands). Adversarial-reviewed (4 lenses). Key decisions from review: - Gate on mergeStateStatus BEHIND/DIRTY, not behind_by>0: only rebases PRs that are actually blocked, which is the gap Dependabot's default rebase-strategy:auto leaves (auto rebases on conflicts/dep-changes, not to satisfy a strict up-to-date rule). Avoids a CI storm + is inert on non-strict repos. - concurrency cancel-in-progress:false (never drop PRs mid comment-loop). - same-repo + non-Dependabot + merged guard (secret/token context safety).
WalkthroughA new reusable GitHub Actions workflow ( ChangesDependabot Keep-Current Reusable Workflow
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/dependabot-keep-current.yml:
- Around line 63-65: The gh pr list command in the workflow is missing an
explicit --limit flag, which means it uses the CLI's default pagination limit
and can silently skip open Dependabot PRs on busy branches. Add the --limit flag
to the gh pr list command on line 63 to ensure all open Dependabot PRs are
processed. Set the limit to a sufficiently high number (such as 100 or more) to
capture all relevant open pull requests from the dependabot[bot] author.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a91b3ae0-ee9b-44f4-9cd6-eff26a9d20a1
📒 Files selected for processing (1)
.github/workflows/dependabot-keep-current.yml
| nums=$(gh pr list --repo "$REPO" --state open --base "$BASE" \ | ||
| --json number,author \ | ||
| --jq '.[] | select(.author.login == "dependabot[bot]") | .number') |
There was a problem hiding this comment.
Add an explicit PR list limit to avoid silently skipping Dependabot PRs.
Line 63 uses gh pr list without --limit; the CLI default cap can leave some open Dependabot PRs unprocessed on busy branches.
Suggested patch
- nums=$(gh pr list --repo "$REPO" --state open --base "$BASE" \
+ nums=$(gh pr list --repo "$REPO" --state open --base "$BASE" --limit 200 \
--json number,author \
--jq '.[] | select(.author.login == "dependabot[bot]") | .number')📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| nums=$(gh pr list --repo "$REPO" --state open --base "$BASE" \ | |
| --json number,author \ | |
| --jq '.[] | select(.author.login == "dependabot[bot]") | .number') | |
| nums=$(gh pr list --repo "$REPO" --state open --base "$BASE" --limit 200 \ | |
| --json number,author \ | |
| --jq '.[] | select(.author.login == "dependabot[bot]") | .number') |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/dependabot-keep-current.yml around lines 63 - 65, The gh
pr list command in the workflow is missing an explicit --limit flag, which means
it uses the CLI's default pagination limit and can silently skip open Dependabot
PRs on busy branches. Add the --limit flag to the gh pr list command on line 63
to ensure all open Dependabot PRs are processed. Set the limit to a sufficiently
high number (such as 100 or more) to capture all relevant open pull requests
from the dependabot[bot] author.
Adds a mechanical reusable that retires the manual
@dependabot rebase: when a PR merges into a branch, it rebases the open Dependabot PRs targeting that branch that are blocked by being out of date.Design (post adversarial review — 4 lenses, all ship-with-fixes)
mergeStateStatusBEHIND/DIRTY, notbehind_by > 0. Dependabot's defaultrebase-strategy: autoalready rebases on conflicts/dep-changes; it does not rebase a clean-but-behind PR to satisfy a strict "require up to date before merging" rule. So we act only on PRs that are actually blocked — which both fills that exact gap and avoids rebasing every behind PR (which would multiply CI churn). Inert on non-strict repos by design.driver-digital-agentsuser (verifiedtype: User) viaAGENTS_GH_PAT. Dependabot ignores@dependabotcommands from Apps/github-actions[bot].cancel-in-progress: false— never cancel a run mid comment-loop (would silently drop PRs).gh), PAT is the sole credential (token stays read-only).Ships as v1.1.0. Caller stub goes into the kit (driver-bonsai-mcp
templates/github/) after tagging.Summary by CodeRabbit