compact-dependabot
Compact open Dependabot PRs into a single branch, run CI, and open a consolidated PR.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 72
- Forks
- 41
01 前言 Front Matter
- name
- compact-dependabot
- description
- Compact open Dependabot PRs into a single branch, run CI, and open a consolidated PR.
03 SKILL.md 正文
Compact Dependabot
Merge all open Dependabot dependency bumps into one PR that passes CI.
Steps
-
Fetch the diffs — run the TypeScript tool to download Dependabot PR diffs:
npx tsx tools/gh-automation/compact-dependabot.tsThis writes
dependabot-diffs.patchin the repo root. -
Study the patch file — read
dependabot-diffs.patchto understand what dependencies are being bumped and across which ecosystems (npm, uv/pip, etc.). -
Reuse the existing branch the user is already on, UNLESS it's on main, in that case, create a new branch from main:
git fetch origin main git checkout -b chore/compact-dependabot origin/main -
Apply the diffs — apply each PR's diff from the patch file. The patch file contains sections separated by comment headers (
# PR #<number>: <title>). Apply them with:git apply dependabot-diffs.patchIf
git applyfails for any section, split the patch by PR section and apply individually. Resolve any conflicts manually. -
Install updated dependencies — run the appropriate install commands for each ecosystem that changed:
- npm:
npm install - uv/pip:
uv lockoruv sync
- npm:
-
Run build:
npx nx affected --base=origin/main -t build --parallel=3 --configuration=ci --output-style=stream --verbose -
Run lint:
npx nx affected --base=origin/main -t lint --parallel=3 --configuration=ci --verbose --output-style=stream --verbose -
Fix failures — if build or lint fail, read the errors and fix them. Re-run until green.
-
Commit and push:
git add -A git commit -m "chore: compact dependabot bumps" git push origin chore/compact-dependabot -
Open a PR:
gh pr create --title "chore: compact dependabot bumps" --body "Consolidates open Dependabot PRs into a single change." --base mainCapture the new PR URL from the output.
-
Close the Dependabot PRs — for each Dependabot PR that was included, add a comment linking to the new PR, then close it:
gh pr comment <number> --body "Superseded by <new-pr-url>" gh pr close <number> -
Clean up — delete the patch file:
rm dependabot-diffs.patch