Consolidate open Dependabot PRs into a single integration branch for unified review and merge.
Consolidate Pull Requests
When asked to consolidate Dependabot PRs:
- List all open Dependabot PRs
gh pr list --repo mckinsey/agents-at-scale-ark --state open --author "app/dependabot" \ --json number,title,headRefName --jq '.[] | "\(.number)\t\(.title)"'
-
Create an integration branch from
maingh api repos/mckinsey/agents-at-scale-ark/git/refs \ -f ref="refs/heads/integration/dependabot" \ -f sha="$(gh api repos/mckinsey/agents-at-scale-ark/git/ref/heads/main --jq '.object.sha')" -
Retarget all Dependabot PRs to the integration branch
gh api repos/mckinsey/agents-at-scale-ark/pulls/<NUMBER> \ --method PATCH -f base="integration/dependabot" -
Squash merge each PR into the integration branch
gh pr merge <NUMBER> --repo mckinsey/agents-at-scale-ark --squash --admin- If a PR has merge conflicts, rebase it onto
integration/dependabotfirst, accepting the dependabot changes - If a PR modifies
.github/workflows/, it requires a token withworkflowscope — flag it for manual merge in the GitHub UI
- If a PR has merge conflicts, rebase it onto
-
Create a consolidated PR from
integration/dependabotintomainwith a summary table of all included updatesgh pr create --repo mckinsey/agents-at-scale-ark \ --head integration/dependabot --base main \ --title "chore(deps): consolidated dependabot updates"