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

issuePrefixes Parser Option No Longer Respected #6

Closed
ghost opened this issue Apr 26, 2016 · 3 comments
Closed

issuePrefixes Parser Option No Longer Respected #6

ghost opened this issue Apr 26, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 26, 2016

I use a package similar to conventional-changelog-angular with a single major difference.

Inside the parserOpts object (https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/index.js#L18) I set issuePrefixes to ['#', '@']. However, only the # prefix is respected by conventional-commits-parser.

It seems this line is replacing my issuePrefixes value with the default for my SCM system (as retrieved from here).

If I comment out that line, my prefix is respected, and my changelog is generated correctly.

@ghost
Copy link
Author

ghost commented Apr 26, 2016

An update:

At one point our custom issuePrefixes worked as desired. It seems the regression happened after the release of get-pkg-repo version 1.2. Our custom prefix worked when we were using version 1.0.0 of get-pkg-repo.

On line 131 the following is called:

repo = getPkgRepo(pkg)

Using version 1.0.0 of get-pkg-repo we get an empty repo object.

Therefore our custom prefixes are used, because core doesn't know what SCM provider defaults to use.

Using version 1.2.0 of get-pkg-repo we get something like the following:

repo { domain: '<REDACTED>',
  user: 'example-group',
  project: 'example-project' }

This causes core to load the defaults for our SCM, and then use those defaults instead of our custom prefixes.

@ghost ghost changed the title issuePrefixes Parser Option No Longer Repsected issuePrefixes Parser Option No Longer Respected Apr 26, 2016
@stevemao
Copy link
Collaborator

PR welcome.

@ghost
Copy link
Author

ghost commented May 1, 2016

@stevemao, sounds good. I'll take a look at it as soon as I have an opportunity.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant