release-it / keep-a-changelog

Keep a Changelog plugin for release-it
MIT License
27 stars 15 forks source link

Add support for alternative version URL formats #24

Closed jasongerbes closed 2 years ago

jasongerbes commented 2 years ago

When using the addVersionUrl option, the version URL format used is hard-coded to GitHub's URL format:

// Unreleased
https://${repo.host}/${repo.repository}/compare/${tagName}...${this.head}

// Latest version
https://${repo.host}/${repo.repository}/compare/${latestTag}...${tagName}

It would be great if you could add optional config for non-GitHub use cases. For example, the format for Azure DevOps looks something like this:

// Unreleased
https://dev.azure.com/<org>/<project>/_git/<repo>/branchCompare?baseVersion=GB${tagName}&targetVersion=GB$main

// Latest version
https://dev.azure.com/<org>/<project>/_git/<repo>/branchCompare?baseVersion=GB${latestTag}&targetVersion=GB${tagName}
jasongerbes commented 2 years ago

It may also be worth adding a URL format of the first release version, e.g.

https://${repo.host}/${repo.repository}/releases/tag/${tagName}