Skip to content

Group Dependabot updates by ecosystem - #129

Open
potiuk wants to merge 1 commit into
apache:mainfrom
potiuk:dependabot-grouped-updates
Open

potiuk wants to merge 1 commit into
apache:mainfrom
potiuk:dependabot-grouped-updates

Conversation

@potiuk

@potiuk potiuk commented Sep 10, 2026

Copy link
Copy Markdown
Member

Why

The repository has no Dependabot configuration, so nothing is watching
poetry.lock, the SHA-pinned actions in the workflows, or the pinned hook
revisions in .pre-commit-config.yaml. The pre-commit pins in particular
(pre-commit-hooks v5.0.0, Lucas-C/pre-commit-hooks v1.5.5) go stale quietly.

The reason to configure this rather than just enable it is volume: ungrouped,
the same set of bumps opens a dozen or so separate PRs.

What this does

Every update is grouped, so a run opens one PR per ecosystem — three a week
at most:

Ecosystem Watches
pip pyproject.toml + poetry.lock (Dependabot reads poetry under pip)
github-actions every uses: in .github/workflows/
pre-commit the pinned rev: of each external hook repo

Security advisories are grouped the same way (a second group per ecosystem with
applies-to: security-updates), so a batch of them arrives as one PR rather
than one apiece.

Python uses versioning-strategy: lockfile-only. pyproject.toml
constrains most dependencies loosely (requests = "*", PyGithub = "^2.7.0")
on purpose; rewriting those constraints on every bump is churn against a file
that is deliberately permissive. The lock file is what needs to stay current.

The SHA pinning survives. All four uses: are pinned to a commit SHA with a
# v4.2.2-style trailing comment. Dependabot updates both the SHA and the
comment, so the pinning is preserved rather than undone.

No ignore rules for majors. CI here is fast; a breaking major should
surface as a red PR rather than be silently skipped.

One deliberate omission

Dependabot can now consolidate across ecosystems into a single PR, via the
top-level multi-ecosystem-groups key. This config does not use it. It is a
newer feature, and the failure mode is bad: a config file Dependabot rejects
stops all updates and reports it only under Insights → Dependency graph →
Dependabot. Per-ecosystem grouping rests on long-established configuration and
collapses ~12 PRs to 3, which is most of the benefit. Easy to revisit later.

enable-beta-ecosystems: true is set for one reason: pre-commit is a recent
addition, and the flag keeps it from being skipped if it is still beta-gated. It
has no effect on the other two.

Testing

Validated against the published Dependabot 2.0 JSON schema
(json.schemastore.org/dependabot-2.0.json) with jsonschema — full document
validation, not a spot check. versioning-strategy: lockfile-only,
applies-to: security-updates, and the pip / github-actions / pre-commit
ecosystem names were each confirmed present in the schema's enums rather than
assumed. Config-only change; the test suite is untouched.

Worth a maintainer checking the Dependabot tab after merge to confirm the file
is accepted and the first three PRs appear.

🤖 Generated with Claude Code

https://claude.ai/code/session_018yUbPm1PL7tsKZJhXFsfj7

The repository had no Dependabot configuration, so nothing was watching
poetry.lock, the SHA-pinned actions in the workflows, or the pinned
pre-commit hook revisions.

Add one, with every update grouped so that a run opens one pull request
per ecosystem rather than one per dependency -- three a week at most,
instead of the dozen or so the same set of bumps would otherwise produce.
Security advisories are grouped the same way, so a batch of them arrives
as one pull request rather than one apiece.

Python updates use lockfile-only. pyproject.toml constrains most
dependencies loosely ("*", "^2.7.0") on purpose, and rewriting those
constraints on every bump is churn against a file that is deliberately
permissive; the lock file is what needs to stay current.

Dependabot can also consolidate across ecosystems into a single pull
request, via the top-level multi-ecosystem-groups key. That is left
unused deliberately: it is a newer feature, and a configuration file
Dependabot rejects stops every update and says so only under Insights ->
Dependency graph -> Dependabot. Per-ecosystem grouping rests on
long-established configuration and gets most of the benefit.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_018yUbPm1PL7tsKZJhXFsfj7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant