googleapis / googleapis/release-please
github-release command quit when get 'Bad pull request title'
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
#### Environment details
- OS: Ubuntu
- Node.js version: 20
- npm version: 10
- `release-please` version: 16.12.0
#### Steps to reproduce
Set `"group-pull-request-title-pattern"` value as `"chore${scope}: releases packages ${component} ${version}"` like this in monorepo .
when in monorepo the merge plugin will make `${component}` `${version}` be undefined. so the title output will be "chore(main): releases packages"
> You can get the message reproduce from [my action log](https://github.com/leavesster/release-please-monorepo-example/actions/runs/10201481970/job/28223418056) and [commit](https://github.com/leavesster/release-please-monorepo-example/commit/dfe3906f1e5d60318ad65e0845abf01adb4ad542)
https://github.com/googleapis/release-please/blob/ace2bd5dc778f83c33ad5dee6807db5d0afdba36/src/util/pull-request-title.ts#L24 this function will generate Regex the pattern as `/^chore(\((?[\w-./]+)\))?: releases packages ?(?@?[\w-./]*)? v?(?[0-9].*)$` which won't match the default value: "chore(main): releases packages".
This make `github-release` command early return and won't create release and tags. the detail code is in https://github.com/googleapis/release-please/blob/ace2bd5dc778f83c33ad5dee6807db5d0afdba36/src/strategies/base.ts#L591
so this will be unable to release a tag.
----
After a few hours search. My believe the `pullRequestTitle` can be undefined. because the release just need get version from the title in https://github.com/googleapis/release-please/blob/ace2bd5dc778f83c33ad5dee6807db5d0afdba36/src/strategies/base.ts#L651
But it can also get from pullRequestBody. so we can just throw the pullRequestTitle away.
I've already test locally and glad to give a pull request if you want.
Contributor guide
Assessment
This issue has not been assessed yet.