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

Incorrect footer parsing #34

Closed
rosen-kanev opened this issue Dec 22, 2022 · 0 comments · Fixed by #35
Closed

Incorrect footer parsing #34

rosen-kanev opened this issue Dec 22, 2022 · 0 comments · Fixed by #35

Comments

@rosen-kanev
Copy link

Hey 👋! I'm using a downstream package git-cliff which produces incorrect output when parsing such commit messages:

fix(example): fix keepachangelog config example

Fixes: #123, #124, #125

and the author of git-cliff helpfully redirected my question to here since the parsing apparently happens via git-conventional. Here's the full context orhun/git-cliff#130.

I carefully went through the Conventional Commits specification here and also here and I'm under the impression that Fixes: #123, #124, #125 should be a valid trailer with a token "Fixes" and a value "#123, #124, #125".

As a sanity check, @conventional-commits/parser does exactly that https://runkit.com/embed/212h966ic1s1
So does git's built-in parser:

message="fix(example): fix keepachangelog config example\n\nFixes: #123, #124, #125"
echo $message | git interpret-trailers --parse # Fixes: #123, #124, #125

Any chance that git-conventional just assumes the trailer value ends on whitespace?

epage added a commit to epage/git-conventional that referenced this issue Dec 29, 2022
When parsing the footer, we were checking until then next footer but we
didn't wait until a newline for that, now we do.

Fixes crate-ci#34
@epage epage closed this as completed in #35 Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant