googleapis / googleapis/release-please
Add branch-suffix configuration to allow multi-manifest setups
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
**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`:
```json
{
"branch-suffix": "core",
"packages": {
"packages/core-a": {},
"packages/core-b": {}
}
}
```
And in `release-please-plugins.json`:
```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.
Contributor guide
Research direction
Read the config schema, BranchName parser, and Merge plugin paths named in the issue first. Done means the schema accepts branch-suffix, parsing recognizes the suffixed pattern, and the Merge and workspace plugins use distinct branch names so two manifests targeting the same branch can maintain separate PRs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- release, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100