adamtabrams / change

A simple tool that automates generating and updating a changelog
GNU General Public License v3.0
75 stars 8 forks source link

changelog links are broken in repositories cloned over SSH #13

Closed TeFiLeDo closed 3 years ago

TeFiLeDo commented 3 years ago

Description When a changelog is generated, it contains several links to GitHub, utilizing the url it found via the "origin" remote. If origin is accessed via SSH, this causes the links to be something like git@github.com:adamtabrams/change/releases/tag/0.13.3, which isn't very usefull.

Expection The script should detect whether origin is accessed over HTTPS or SSH, and if the latter, it should modify the URL accordingly.

This could be done by checking the start of the remote URL for git@

Replication Explain how to recreate the bug.

  1. Clone a repository via SSH
  2. Generate a changelog using change
  3. Check the output file

Environment

Further Explanation I assume this could be changeing the first sed command in update_links() to something like:

sed "s|\(git@\)?\(.*\)\.git|\2|"
adamtabrams commented 3 years ago

@TeFiLeDo Thanks for finding and posting about this bug. I just released a new version to fix it. Please let me know if this fix works for your case or not.

TeFiLeDo commented 3 years ago

Will check this evening, ~20:00-22:00 UTC

TeFiLeDo commented 3 years ago

Works for me! :+1:

adamtabrams commented 3 years ago

Great! Thanks for the help.