Description
It is a common practice that developers put their ticket number at the beginning of their commits and pull requests. These ticket numbers then appear in the changelog, but as plain text. It would be helpful if the changelog generator could do a regex for the ticket number pattern and replace it with a link to the ticket in the project management tool of your choice.
I envision this working by passing the following command line arguments:
--ticket-url
--ticket-pattern
Here is how I'm currently implementing this in Travis without the feature in place:
github_changelog_generator --between-tags ${TRAVIS_TAG} --no-unreleased -t ${GITHUB_OAUTH_TOKEN} --no-verbose -o '/tmp/release-notes.txt'
perl -i -pe 's#([A-Z]{2,}-\d+)#[$1](https://example.atlassian.net/browse/$1)#g' /tmp/release-notes.txt
This transforms something like [PROJ-123]
into a link directly to JIRA.
This works well because the ticket number is directly in the URL instead of an ID, which could be problematic in other ticket management tools.
Here is how I would like to see it work:
github_changelog_generator --between-tags ${TRAVIS_TAG} --no-unreleased -t ${GITHUB_OAUTH_TOKEN} --no-verbose --ticket-url 'https://example.atlassian.net/browse/$1' --ticket-pattern '([A-Z]{2,}-\d+)' -o '/tmp/release-notes.txt'