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

doc : Added an example of a postcommit hook #232

Merged
merged 1 commit into from
May 21, 2018

Conversation

spudheadc
Copy link
Contributor

Added an example of a postcommit hook to replace links which refer to GitHub issues with a link to Jira issues

Added an example of a postcommit hook to replace links which refer to GitHub issues with a link to Jira issues
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling a8e4aeb on spudheadc:patch-1 into 9a99607 on conventional-changelog:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling a8e4aeb on spudheadc:patch-1 into 9a99607 on conventional-changelog:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling a8e4aeb on spudheadc:patch-1 into 9a99607 on conventional-changelog:master.

@stevemao
Copy link
Member

stevemao commented Feb 6, 2018

You doesn't need to do this to achieve this. It's pretty hacky... But the config looks really simple.

@spudheadc
Copy link
Contributor Author

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"
Copy link
Member

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.

@bcoe bcoe merged commit fbfdf5e into conventional-changelog:master May 21, 2018
@bcoe
Copy link
Member

bcoe commented May 21, 2018

@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.

@spudheadc spudheadc deleted the patch-1 branch May 21, 2018 22:34
@spudheadc
Copy link
Contributor Author

@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:-)

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

Successfully merging this pull request may close these issues.

4 participants