Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github-release command quit when get 'Bad pull request title' #2346

Open
leavesster opened this issue Aug 2, 2024 · 1 comment
Open

github-release command quit when get 'Bad pull request title' #2346

leavesster opened this issue Aug 2, 2024 · 1 comment
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@leavesster
Copy link

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 and commit

export function generateMatchPattern(
this function will generate Regex the pattern as /^chore(\((?<branch>[\w-./]+)\))?: releases packages ?(?<component>@?[\w-./]*)? v?(?<version>[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

this.logger.error(`Bad pull request title: '${mergedPullRequest.title}'`);

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

let version: Version | undefined = pullRequestTitle.getVersion();

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.

@leavesster leavesster added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Aug 2, 2024
@realmunk
Copy link

realmunk commented Oct 8, 2024

Ran into this issue when using the GitHub app for Release Please. This was really tough to debug, and made me question if this was a branch protection issue or similar. Did not find any error logs.

In addition to fixing this issue – would it make sense to perhaps add a label or similar that can trigger debug logs for the GitHub app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants