oscarotero / keep-a-changelog

Node & Deno package to parse and generate changelogs
MIT License
61 stars 20 forks source link

Support GitLab URLs in CLI #35

Closed trivialkettle closed 12 months ago

trivialkettle commented 12 months ago

Hi, if I use the CLI I cannot customize the compare links / tags links. Is is possible to add an CLI option to change to GitLab urls?

GitLab compare links: https://gitlab.com/gitlab-org/gitlab-runner/-/compare/0.4.0...0.4.1 GitLab tag link: https://gitlab.com/gitlab-org/gitlab-runner/-/tags/v16.0.0 Note the dash between repository URL and compare and tags.

AFAIK GitLab does not support HEAD to compare unreleased commits. We could use main as default. Thanks.

trivialkettle commented 12 months ago

https://github.com/oscarotero/keep-a-changelog/pull/36 and https://github.com/oscarotero/keep-a-changelog/pull/37 were some issues I noticed while testing a solution for this with a custom compareLinkBuilder in bin.ts.

In https://github.com/oscarotero/keep-a-changelog/pull/37 you wrote, that you want to create an object for some well known services, would this be in the cli or library code?

oscarotero commented 12 months ago

@trivialkettle it would be only in the CLI (for now).

I just made these changes https://github.com/oscarotero/keep-a-changelog/commit/5990d63fbbb3d1ed78cab7ac0b86a8ca7b295f25 what do you think?

trivialkettle commented 12 months ago

I am not an experienced JS/TS developer, but looks good so far.

Though since you can self host gitlab, we could need an way to detect self hosted gitlab instances like gitlab.exmaple.com.

oscarotero commented 12 months ago

Okay, I just updated the code and now can detects gitlab.com and gitlab.*

oscarotero commented 12 months ago

Okay, I just released 2.5.0. If you catch any bug, feel free to open more issues. Thanks!

trivialkettle commented 12 months ago

Works like a charm. Thanks!