SAP / SAP/pull-request-semver-bumper
feat: monorepo support — independent per-package semver bumping
Open
@ricogu is already working on this.
Since May 14, 2026.
enhancement
feature
- Dominant language
- No language data
- Stars
- 3
- Forks
- 4
- Avg merge
- 11d 11h
- Merged PRs (30d)
- 3
Description
Summary
Add monorepo support to pull-request-semver-bumper so that independently-versioned packages within a single repository can each be bumped based on what the PR actually touches.
Design
Full design spec: docs/superpowers/specs/2026-05-12-monorepo-support-design.md
How It Works
Monorepo mode is auto-activated when a bumper.monorepo.json file exists at the repo root — no changes to action.yml inputs required.
{
"packages": [
{ "path": "packages/foo" },
{ "path": "packages/bar", "type": "maven" },
{ "path": "services/auth", "type": "npm" }
]
}
Behavior
- Changed-file detection — the action cross-references PR changed files against declared package paths. Only packages actually touched by the PR are bumped.
- Same bump level — a single bump level (
major,minor,patch) is derived from PR commits and applied to all touched packages. - Single combined commit — all version file changes are staged and committed atomically:
version bump packages/foo@1.2.0 packages/bar@2.1.0 - Heterogeneous types — each package can be
npm,maven,python, orversion-file. Iftypeis omitted, it's auto-detected from the package directory. - No packages touched → no-op — if the PR doesn't touch any declared package, the action exits with
bumped: falseand makes no commit.
Config Schema
| Field | Required | Description |
|---|---|---|
path |
Yes | Relative path to the package |
type |
No | npm, maven, python, version-file (auto-detected if omitted) |
package-json-file |
No | Per-package path override |
pom-file |
No | Per-package path override |
pyproject-file |
No | Per-package path override |
version-file |
No | Per-package path override |
bump-command |
No | Per-package custom bump command |
Outputs in Monorepo Mode
| Output | Value |
|---|---|
bumped |
true / false |
new-version |
JSON map: {"packages/foo":"1.2.0","packages/bar":"2.1.0"} |
bumpLevel |
Single level applied to all: "minor" |
Code Changes
New files under .github/actions/core/src/monorepo/:
load-config.ts— parse & validatebumper.monorepo.jsondetect-packages.ts— cross-reference PR changed files with package pathsdetect-type.ts— auto-detect package type from filesystemorchestrate.ts— main loop: bump each touched package, build combined commit
Existing code untouched except:
index.ts— add config detection branchgit/git.ts— add multi-file stage + combined commit message builder
What Is Not Changing
- Existing single-package mode is fully preserved
action.ymlinputs are unchanged- All existing composite actions under
.github/actions/version-bumping/are untouched
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.