PaulHatch / semantic-version

A GitHub Action to generate semantic version from a git repository's commit history.
MIT License
343 stars 63 forks source link

Make create release link work with other domains. #91

Open Dill-Dall opened 1 year ago

Dill-Dall commented 1 year ago

Cheers 👋

The action asserts that the domain is always github.com meaning enterprises with their own domains can't use this feature and get a 404.

To create a release for this version, go to https://github.com/some-repo/pring-boot-starter/releases/new?tag=v0.1.0&target=sjdlkasdl

#main.ts 

L:17 if (repository !== undefined) {
    core.info(`To create a release for this version, go to https://github.com/${repository}/releases/new?tag=${versionTag}&target=${currentCommit.split('/').slice(-1)[0]}`);
}
PaulHatch commented 1 year ago

@ThomasDahll What does the URL for enterprise deployments look like? Perhaps just making this a relative URL would be enough.

Dill-Dall commented 1 year ago

Relative would probably be enough

We have "github.ourenterprisetitle.io/\<enterprise-organization>/\<repository>" instead of github.com/\<repository> But I bet that domain setup can vary(selfhosted vs cloud for instance), so would probably be best with just a relative domain like so https://\<domain+organization>/\<repository...> Would probably catch all cases.