Skip to content
This repository has been archived by the owner on Feb 5, 2018. It is now read-only.

referencing a commit in parenthesis results in a parsing error #27

Closed
bcoe opened this issue May 2, 2016 · 3 comments
Closed

referencing a commit in parenthesis results in a parsing error #27

bcoe opened this issue May 2, 2016 · 3 comments
Labels

Comments

@bcoe
Copy link

bcoe commented May 2, 2016

the following commit message:

fix: upgraded dependencies, switched back to angular format (fixes #27), pinned shelljs to version that works with nyc (#30)

results in a corrupt commit entry:

* upgraded dependencies, switched back to angular format (fixes [#27](https://github.com/conventional-changelog/standard-version/issues/27)), pinned shelljs to version that works with nyc ([#30](https://github.com/conventional-changelog/standard-version/issues/30))([3f51e94](https://github.com/conventional-changelog/standard-version/commit/3f51e94)), closes [#27](https://github.com/conventional-changelog/standard-version/issues/27) [(#30](https://github.com/(/issues/30)

the underlying cause seems to be the way references (fixes #foo are handled).

@bcoe bcoe added the bug label May 2, 2016
@stevemao
Copy link
Collaborator

stevemao commented May 2, 2016

The regex is a bit too loose. Smilar: #26

@bcoe
Copy link
Author

bcoe commented May 2, 2016

@stevemao is there an easy way for an upstream library to disable the logic that replaces fixes #foo with:

,closes #32 until we fix this regex, it would be nice to prevent this behavior in standard-version.

@stevemao
Copy link
Collaborator

stevemao commented May 2, 2016

Use a custom template and remove the "commit references" part. https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/templates/commit.hbs#L22-L51

stevemao added a commit that referenced this issue May 2, 2016
So for messages like "fix: upgraded dependencies, switched back to angular format (fixes #27), pinned shelljs to version that works with nyc (#30)", "(" will not be treated as a `repository`

For now the part that matches a `repository` is `([\\w-\\.\\/]*?)??` instead of `(\\S*?)??`, which is too loose but I might miss some valid characters here.

Fixes #27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants