Skip to content

Add branch-suffix configuration to allow multi-manifest setups #2855

Description

@codyoss

Is your feature request related to a problem? Please describe.

In large repositories (monorepos), it is common to want to split the release management into multiple release-please manifests. For example, you might want one manifest for "core" packages and another for "plugins" or "submodules", even though they all release to the same target branch (e.g., main).

Currently, if you run release-please with multiple config files targeting the same branch, they will conflict if merging is enabled (which is the default separate-pull-requests: false).

  • Both runs will attempt to create/update a release branch named release-please--branches--${targetBranch} (e.g., release-please--branches--main).
  • This causes the runs to race and overwrite each other's branch and PR content. Only one bulk release PR can be open at a time.

Describe the solution you'd like

We would like to introduce a new global configuration option: branch-suffix (string).

If configured, this suffix will be appended to the generated release branch name for merged pull requests.

For example, in release-please-core.json:

{
  "branch-suffix": "core",
  "packages": {
    "packages/core-a": {},
    "packages/core-b": {}
  }
}

And in release-please-plugins.json:

{
  "branch-suffix": "plugins",
  "packages": {
    "packages/plugin-a": {},
    "packages/plugin-b": {}
  }
}

This would result in the following branch names:

  • Core release PR: release-please--branches--main--suffix--core
  • Plugins release PR: release-please--branches--main--suffix--plugins

These branches (and their corresponding PRs) can coexist without overwriting each other.

Describe alternatives you've considered

  • linked-versions plugin: This plugin does group PRs and uses a group-specific branch name (release-please--branches--${targetBranch}--groups--${groupName}). However, it forces the versions of all packages in the group to be linked (bumped together), which might not be desired.

Additional context

To support this, the following changes would be needed in release-please:

  1. Schema: Add branch-suffix to the config schema.
  2. Parser: Update the BranchName parser to recognize the new pattern release-please--branches--${targetBranch}--suffix--${suffix} so that release-please can still identify and update its own open PRs.
  3. Merge Plugin: Pass the suffix (or the computed branch name) to the Merge plugin (and workspace plugins that use it) so it uses the suffixed branch name when creating the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions