-
Notifications
You must be signed in to change notification settings - Fork 797
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
doc : Added an example of a postcommit hook #232
Conversation
Added an example of a postcommit hook to replace links which refer to GitHub issues with a link to Jira issues
2 similar comments
You doesn't need to do this to achieve this. It's pretty hacky... But the config looks really simple. |
I agree it is not the best looking piece of config. And that a code solution would be better. However tthis particular hack means that my project didn't have to do a code change and could use standard-version out of the box without needing to fork. My requirements were simple - I wanted exactly what standard-version offers with the one exception, we use Jira rather than Github to track issues. |
{ | ||
"standard-version": { | ||
"scripts": { | ||
"postchangelog": "replace 'https://github.com/myproject/issues/' 'https://myjira/browse/' CHANGELOG.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this example, although it would be nice to eventually make the URL more easily configurable.
@spudheadc @stevemao landing this example, but I think we should work together and come up with a less hacky version o this eventually, e.g., through configuration. |
@bcoe @stevemao in real life we are using $npm_package_bugs_url (see https://docs.npmjs.com/files/package.json#bugs) but this is linux specific and will not work in windows. As I only run the standard-version in a linux based CI that will do for me. We could probably use something like https://www.npmjs.com/package/cross-var to do a cross platform implementation. Trying to document that however got tricky - so for the readme I stuck with the basics:-) |
Added an example of a postcommit hook to replace links which refer to GitHub issues with a link to Jira issues