Issues regarding conventional commits parsing

Author: nicomoussCreated Sep 26, 2026Updated Sep 26, 2026
Labelstype: bugpriority: p3

Been using release-please on various projects very successfully over the past years. Great product !

Over time, I've hit a few glitches regarding how release-please internally parses conventional commits. Those are described in the various sections below.

Diving inside release-please codebase, those issues appear to be stuff within parseConventionalCommits(...) method.

I have a soon-to-be-ready PR that fixes all those. Especially I'd need feedback about the last section here to be fully inline with multiple conventional commits declarations.

Number of conventional commits extracted is wrong when footers are present

This git commit ...

txt
feat: adds v4 UUID to crypto
This adds support for v4 UUIDs to the library.
Reviewed-by: @nicolas
Refs: #123

... is a conventional commit containing a header (feat: adds v4 UUID to crypto), a body (This adds support for v4 UUIDs to the library.), and two footers (Reviewed-by: @nicolas and Refs: #123)

When parsed, one expects that it should be extracted as 1 conventional commit.

Although internally release-please extracts 3 conventional commits out of it, as shown below:

typescript
// The git commit to parse ...
const commits: Commit[] = [ {
sha: "30719c4",
message: `
feat: adds v4 UUID to crypto
This adds support for v4 UUIDs to the library.
Reviewed-by: @nicolas
Refs: #123
`
}];

// Parsing the git commit ...
const conventionalCommits = parseConventionalCommits(commits);

// conventionalCommits array contains:
[
  { // NOT OK
    "sha": "30719c4",
    "message": "Reviewed-by: @nicolas",
    "type": "Reviewed-by",
    "scope": null,
    "bareMessage": "@nicolas",
    "notes": [],
    "references": [],
    "breaking": false
  },
  { // NOT OK
    "sha": "30719c4",
    "message": "Refs: #123",
    "type": "Refs",
    "scope": null,
    "bareMessage": "#123",
    "notes": [],
    "references": [],
    "breaking": false
  },
  { // OK !
    "sha": "30719c4",
    "message": "feat: adds v4 UUID to crypto",
    "type": "feat",
    "scope": null,
    "bareMessage": "adds v4 UUID to crypto",
    "notes": [],
    "references": [
      {
        "prefix": "#",
        "action": "Refs",
        "issue": "123"
      }
    ],
    "breaking": false
  }
]

The wrong number of parsed conventional commits is visible in the logs:

bash
✔ Building candidate release pull request for path: .
❯ ...
❯ commits: 3
✔ Considering: 3 commits

Would the parsing be correct, the logs would print:

bash
✔ Building candidate release pull request for path: .
❯ ...
❯ commits: 1
✔ Considering: 1 commits

This bug is actually a bit sneaky, because appart from the logs there is no visible side-effect of this incorrect parsing in the final artifacts produced by release-please. In the example above, due to the fact that Reviewed-by and Refs would typically not be conventional commit types defined in release-please config, those wrongly-parsed conventional commits would not end up in the changelog anyway.

But the parsing is inherently wrong internally, and this should obviously be fixed.

BEGIN_NESTED_COMMIT/END_NESTED_COMMIT parsing is wrong in some cases

BEGIN_NESTED_COMMIT/END_NESTED_COMMIT blocks should only be parsed when they are defined at the beginning of lines, as such:

txt
fix: fix parsing of nested commits

BEGIN_NESTED_COMMIT
fix: fix another bug
END_NESTED_COMMIT

The current implementation of parseConventionalCommits(...) considers every BEGIN_NESTED_COMMIT/END_NESTED_COMMIT block, disregarding their positions in the git commit.

This means that in the git commit below, the block is parsed, whereas it should not be:

txt
fix: fix parsing of nested commits
This properly parses BEGIN_NESTED_COMMIT and END_NESTED_COMMIT stuff.

Clarify how to declare multiple conventional commits within one git commit

Following what have been done in #2390, the correct way to declare multiple conventional commits within a single git commit (aside from using BEGIN_NESTED_COMMIT/END_NESTED_COMMIT blocks), is by separating those with blank lines.

So that the following git commit leads to 3 conventional commits (feat: my feature 1, feat: my feature 2, and feat: my feature 3):

txt
feat: my feature 1

feat: my feature 2

feat: my feature 3

By extension to #2390, the following git commit should lead to one and only one conventional commit (feat: my feature 1), because no empty lines are separating the various declarations afterwards:

txt
feat: my feature 1
feat: my feature 2
feat: my feature 3

Could someone confirm this is the correct assumption (aka release-please users MUST insert blanks line in-between their conventional commits) ?

If so:

  • This should be clearly described in the documentation.
  • The codebase should also match this behavior. At the moment, there is some leftovers from this, which still parses footers. So that in the previous example with no separating lines between the conventional commits, still the parsing leads to 3 conventional commits (feat: my feature 1, feat: my feature 2, and feat: my feature 3). By a side-effect of parsing footers, the first issue described in this ticket arises.

Source: googleapis/release-please