SAP / SAP/pull-request-semver-bumper

feat: monorepo support — independent per-package semver bumping

Open
#82 0 comments 0 reactions 1 assignee View on GitHub

@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, or version-file. If type is 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: false and 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 & validate bumper.monorepo.json
  • detect-packages.ts — cross-reference PR changed files with package paths
  • detect-type.ts — auto-detect package type from filesystem
  • orchestrate.ts — main loop: bump each touched package, build combined commit

Existing code untouched except:

  • index.ts — add config detection branch
  • git/git.ts — add multi-file stage + combined commit message builder

What Is Not Changing

  • Existing single-package mode is fully preserved
  • action.yml inputs are unchanged
  • All existing composite actions under .github/actions/version-bumping/ are untouched

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.