pawamoy / git-changelog

Automatic Changelog generator using Jinja2 templates.
https://pawamoy.github.io/git-changelog
ISC License
127 stars 33 forks source link

Add an remote_url config option #77

Open pedro-psb opened 3 months ago

pedro-psb commented 3 months ago

Is your feature request related to a problem? Please describe.

The only way to customize the URL generated in the changelog title (e.g, to point to a github tag) is using the envvar GIT_CHANGELOG_REMOTE, which accepts only remote names.

In different machines (including CI), remote names can be different, which makes it inconvenient to automate. E.g.:

I may create a script to use the upstream remote, which points to the original project remote. A different machine may use myupstream, which will produce break the script.

Describe the solution you'd like

Allow to pass the remote URL in the config and CLI args:

remote_url="https://github.com/myorg/myproject.git"
git-changelog --remote-url "https://github.com/myorg/myproject.git"

Describe alternatives you've considered

Not sure.

Additional context

pawamoy commented 3 months ago

Sounds like a good idea :slightly_smiling_face:

I therefore suggest we implement all the following:

I don't think the environment variables are currently documented, we should document them too.

pedro-psb commented 3 months ago

You mean, to have it as an envvar and cli-arg only, and not as an option in the config file?

pawamoy commented 3 months ago

Sorry, I meant in addition to the configuration option :smile: Let me edit my comment.