nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
22.99k stars 2.3k forks source link

`nx release changelog` should support non `github.com` remotes #21906

Open jaknas opened 6 months ago

jaknas commented 6 months ago

Description

Currently when trying to run nx release with projectChangelogs.createRelease = 'github' option, I'm getting:

Unable to create a GitHub release because the GitHub repo slug could not be determined.

My git remote -v returns format like this: git@foo.com:ACME/REPO.git

Motivation

This is something that's built-in with Lerna and works great. Would love to have this feature in Nx so I can migrate to using nx release.

Suggested Implementation

It should be able to automatically deduce if remote is not github.com and for e.g uses github enterprise.

Alternate Implementations

Allow for configuration via programatic API or nx.json

zachlewton commented 3 months ago

just curious if there was any plans to add this feature, currently setting up some pipelines in an enterprise github repo and i am not able to use the github release features or have the changelog commits resolve. really enjoying using the release api btw, awesome product !

pcopley commented 3 months ago

I was about to submit a PR that addresses this issue for GitHub Enterprise instances (which have a similar issue), I will see if I can easily extend it to handle this use case.

JamesHenry commented 2 months ago

Hi Folks,

I have put up a draft PR which adds support for GitHub Enterprise Server: https://github.com/nrwl/nx/pull/26482

I am not fully happy with the implementation details and may do some more refactoring, but functionally it should be just about there.

Are you willing to help me test it out on your repo please? Have you ever done a local build of Nx and applied things that way?

JamesHenry commented 2 months ago

Hi again folks,

Good news, we now have the capability to create npm releases for PRs for testing purposes. This is something we will use very sparingly to avoid confusion, but for something like this it's a perfect solution because it's a real npm version that you can install and commit as needed, and you don't need to do any local builds of this repo.

Please see the comment here for details, and let me know how you get on with testing it:

https://github.com/nrwl/nx/pull/26482#issuecomment-2165727973

Many thanks 🙏