How do grouped updates in GitHub's dependabot.yml reduce pull request volume?
answer
- One branch instead of many
- Selection by glob, scope, or bump size
- It frees room under the PR limit
- Red on one member blocks the rest
- applies-to decides advisory PRs too
basics
~20 sA groups block in GitHub's dependabot.yml collapses many dependency bumps into one branch and one pull request per group per run. You define groups by name with patterns, dependency-type, or update-types, so twenty individual PRs become one reviewable change.
solid answer
~40 sInside an `updates:` entry you add a `groups:` map; each key is a group name and its value selects members via `patterns` and `exclude-patterns` (glob matches on package names), `dependency-type` (`development` or `production`), and `update-types` (`major`, `minor`, `patch`). Everything a run would have bumped that matches a group goes into a single branch and a single pull request; anything unmatched still gets its own PR. Because a group counts as one pull request, grouping also frees up room under `open-pull-requests-limit`. Setting `applies-to: security-updates` on a group applies the same collapsing to advisory-driven PRs. The tradeoff is granularity: if one member of a ten-package group breaks CI, the whole PR is red and you cannot merge the other nine, so most teams group low-risk minor/patch and dev-scoped bumps and leave majors ungrouped.
code
yaml · 19 linesversion: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
groups:
dev-tooling:
dependency-type: "development"
update-types: ["minor", "patch"]
aws-sdk:
patterns:
- "@aws-sdk/*"
exclude-patterns:
- "@aws-sdk/client-s3"
production-minor:
dependency-type: "production"
update-types: ["minor", "patch"]go deeper
Know that GitHub can bundle several dependency bumps into a single pull request, and that this is configured in the repository's dependabot.yml rather than clicked in the UI.
Be able to write a groups block from memory: group name, patterns, exclude-patterns, dependency-type, update-types. Explain that one group means one branch and one pull request per run.
Demonstrate the tradeoff explicitly — throughput versus isolation and bisectability — and describe a real grouping strategy: patch and minor grouped, majors alone, chronic breakers excluded.
Frame grouping as a presentation control, not a risk control. Be ready to say when the real lever is cadence, direct-only allow rules, or repository ownership instead, and what you would measure to know the configuration is working.
## The problem grouping solves A repository with a broad dependency tree and a weekly schedule can produce dozens of individual bump pull requests. Each one costs a CI run, a review click, and a merge. Worse, they interact: merging one rebases the rest, which re-runs their checks, which produces more notifications. Teams respond by ignoring the bot, which is the failure mode the feature exists to prevent. ## How groups are declared `groups:` sits inside a single `updates:` entry, so grouping is per ecosystem and per directory. Each entry is a group name mapped to selection criteria: - `patterns` — a list of globs matched against package names, e.g. `@aws-sdk/*` or `org.springframework.*`. `*` alone matches everything in the ecosystem. - `exclude-patterns` — carves specific packages back out of a group so they keep getting their own pull request. - `dependency-type` — `development` or `production`, useful when your risk appetite differs between test tooling and runtime libraries. - `update-types` — `major`, `minor`, `patch`. This is the most valuable filter: group the boring bumps, isolate the risky ones. - `applies-to` — `version-updates` (the default) or `security-updates`, so you can decide separately whether advisory-driven fixes are collapsed. Groups are evaluated in order; a dependency lands in the first group it matches, so a catch-all group belongs last. ## What actually happens on a run Dependabot performs its normal resolution for the ecosystem, then partitions the set of updates it decided to make. Each non-empty group produces one branch and one pull request whose body lists every member with its old and new version and links to each changelog. Ungrouped updates behave exactly as before. On the next run, if the group's contents change — a member gets a newer version, or a new package matches — Dependabot updates the existing branch rather than opening a second one. Because the group is one pull request, `open-pull-requests-limit` sees it as one. A repository that was permanently pinned at its limit of five open PRs, never reaching the sixth dependency, starts making progress. ## The tradeoff you must state Grouping trades isolation for throughput. Benefits: fewer CI runs, one review, one merge, and a much better signal-to-noise ratio in notifications. Costs: - **All-or-nothing merging.** One incompatible member makes the whole PR red. You then have to work out which one, and either exclude it via `exclude-patterns` or split the group. - **Harder attribution.** If a grouped merge causes a regression, you have a bigger surface to bisect than a single-package PR would have given you. - **Review depth erodes.** A twenty-package PR gets less scrutiny per package than twenty PRs would — which is fine for patch bumps in dev tooling and not fine for a runtime framework major. The usual shape of a good configuration is therefore: a `patch`/`minor` group for production dependencies, a broad group for development-scoped dependencies, explicit exclusions for the two or three libraries that always break, and no grouping at all for majors. ## Interaction with security updates By default, security PRs are not grouped, which is usually what you want: an advisory-driven bump should be independently mergeable and fast. Where a repository receives a steady stream of low-severity advisories in dev tooling, `applies-to: security-updates` on a narrow group is defensible — but grouping a critical runtime fix behind nine unrelated bumps is how a fix sits unmerged for a week. ## Operating a grouped PR When a grouped pull request goes stale or you have changed the group definition, the comment commands still work: `@dependabot rebase` refreshes it against the base branch, and `@dependabot recreate` throws the branch away and rebuilds it from scratch, which is what you want after editing `groups:`. If you need to drop one member, add it to `exclude-patterns` and recreate rather than hand-editing the branch — Dependabot owns that branch and will overwrite manual commits on the next run. ## When grouping is not the answer If the noise comes from a daily schedule on a repository nobody actively maintains, the fix is cadence and ownership, not grouping. If it comes from an ecosystem that publishes constantly, `allow` with `dependency-type: direct` narrows the surface far more than any grouping will. Grouping is a presentation-layer control; it does not reduce the amount of change flowing in, only the number of doors it comes through.
- A grouped pull request fails CI because one package in it is incompatible. What do you do?Identify the offending package, add it to that group's exclude-patterns so it gets its own pull request, and comment @dependabot recreate to rebuild the group branch without it. Then handle the excluded package on its own, where the failure is isolated and the diff is small enough to debug.
- Would you group security updates as well as version updates?Usually not for runtime dependencies. A security fix should be independently and quickly mergeable, and grouping means one failing member can hold a critical bump hostage. Setting applies-to: security-updates on a narrow, low-severity, development-scoped group is defensible; collapsing all advisory-driven PRs into one is not.
- Does grouping change how open-pull-requests-limit counts?Yes — a group is one pull request regardless of how many packages it carries. That is a side benefit: repositories that constantly sat at their limit and never reached the rest of the backlog start draining it, because the same limit now covers far more dependencies.
saying these in an interview costs you the question
- Groups every dependency including majors into one PR
- Thinks grouping reduces how much change arrives
- Hand-edits the Dependabot branch instead of recreating it
- Assumes grouping applies to security PRs by default
- Believes a group counts as many PRs against the limit