Consolidate all open Renovate dependency PRs into a single uber-branch. Run autonomously without prompting - handles conflicts, runs tests, bisects failures.
Consolidate all open Renovate dependency PRs into a single uber-branch for one build/merge.
This skill runs fully autonomously. Do not prompt the user for decisions. Follow these rules:
pnpm installAll work happens in a temporary worktree so the user's checkout is unaffected.
# Setup
REPO_PATH="/Users/stef/code/CPS/global-components"
WORKTREE_PATH="/tmp/claude/renovate-worktree-$(date +%Y%m%d-%H%M%S)"
git -C "$REPO_PATH" fetch origin main
git -C "$REPO_PATH" worktree add "$WORKTREE_PATH" origin/main
cd "$WORKTREE_PATH"
git checkout -b renovate/uber-$(date +%Y%m%d)
# Cleanup (after PR created)
git -C "$REPO_PATH" worktree remove "$WORKTREE_PATH" --force
gh pr list --author "app/renovate" --json number,title,headRefName,createdAt,mergeable --jq 'sort_by(.createdAt)'
REPO_PATH="/Users/stef/code/CPS/global-components"
WORKTREE_PATH="/tmp/claude/renovate-worktree-$(date +%Y%m%d-%H%M%S)"
git -C "$REPO_PATH" fetch origin main
git -C "$REPO_PATH" worktree add "$WORKTREE_PATH" origin/main
cd "$WORKTREE_PATH"
git checkout -b renovate/uber-$(date +%Y%m%d)
For each PR, oldest first:
git fetch origin <branch>
git merge origin/<branch> --no-edit
If merge conflict:
package.json:
git checkout --theirs package.json
git add package.json
git commit --no-edit
pnpm-lock.yaml: just delete it (will regenerate later)
git rm pnpm-lock.yaml
git commit --no-edit
git merge --abort
# Add to skipped list with reason "source code conflict"
Track which PRs were successfully merged.
After all merges complete:
pnpm install
git add pnpm-lock.yaml
git commit -m "chore: regenerate lockfile after dependency updates"
Ensure Docker is running for e2e/proxy tests:
if ! docker info &>/dev/null; then
open -a Docker 2>/dev/null || true
for i in {1..30}; do docker info &>/dev/null && break || sleep 2; done
fi
Run the full validation suite:
pnpm install
pnpm -w build
pnpm -w test
pnpm -w test:e2e
pnpm -w test:proxy
If any validation step fails:
git checkout -b renovate/uber-$(date +%Y%m%d)-v2 origin/main
# Re-merge all PRs except the culprit
git push -u origin HEAD
gh pr create --title "chore(deps): consolidate Renovate updates $(date +%Y-%m-%d)" --body "$(cat <<'EOF'
## Consolidated Dependency Updates
This PR combines multiple Renovate PRs into a single update.
### Included PRs
- #XXX title
- #YYY title
### Skipped PRs
- #ZZZ title - Reason
---
**After merging this PR**, tell Claude: "renovate uber-PR is merged" to auto-close the source PRs.
EOF
)"
Poll CI status every 30 seconds until complete:
gh pr checks <pr-number> --watch
git -C "$REPO_PATH" worktree remove "$WORKTREE_PATH" --force
=== Renovate Consolidation Complete ===
Uber-PR: https://github.com/.../pull/XXX
Included (N PRs):
- #635 puppeteer v24
- ...
Skipped (M PRs):
- #607 nginx - BLOCKED (pinned)
- #614 uuid v13 - FAILED test
- ...
CI Status: PASSED
**You review and merge the PR manually.**
Then say: "renovate uber-PR is merged"
The human reviews and merges the uber-PR manually. The skill does NOT auto-merge.
When user says any of:
Execute cleanup:
# For each PR that was included in the uber-branch:
gh pr close <number> --comment "Closed: included in consolidated update PR #<uber-pr-number>"
Report:
Closed 7 Renovate PRs:
- #635 puppeteer v24
- #638 testing-library/react v16
- ...
Still open (were skipped):
- #607 nginx - pinned dependency
- #614 uuid v13 - failed tests
Phase 1 - Create uber-PR:
/renovatePhase 2 - Cleanup after merge: