-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(release): support github enterprise server #26482
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 500ac05. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 4 targets
Sent with 💌 from NxCloud. |
🐳 We have a release for that!This PR has a release associated with it. You can try it out using this command: npx create-nx-workspace@0.0.0-pr-26482-ebe2dba my-workspace Or just copy this version and use it in your own command: 0.0.0-pr-26482-ebe2dba
To request a new release for this pull request, mention someone from the Nx team or the |
Hello again, and sorry about my delayed answer @JamesHenry . Thanks a lot for your reactivity, thoses PR releases are such an awesome capability by the way. I was able to test your changes in our repository and the only "issue" left is about the regex which extracts the repo slug in getGithubRepoData.
As github authorize '-', '_', and '.' as separators in the repository name (as well as any ASCII letters and digits), the regex is not able to capture the repo slug properly when a dot is used as a separator for example. (Which was the case in our context.) After patching this, i was able to go through the whole release workflow and i'am happy to say it works perfectly with our configuration. We've tested both the default api url configuration as well as the custom one, and each time it was successful to create a github release on GHES. Don't hesitate to let me know if you need further testing. Thanks for the great work put in nx release again ! |
Hey 👋 Do you know whether there're any plans to merge this PR in the near future? |
ebe2dba
to
7ad9136
Compare
Hi Folks, I'm updating the branch to include all the latest changes with Nx, and will cut another PR release once CI is green. @Bare1337 thanks a lot for the feedback, please could you provide the updated regex as well as examples of valid inputs you are expecting it to support, I want to make sure we have tests for that? @xalechez Have you been testing out the release? Do you have any feedback? |
🐳 We have a release for that!This PR has a release associated with it. You can try it out using this command: npx create-nx-workspace@0.0.0-pr-26482-1bdb7bd my-workspace Or just copy this version and use it in your own command: 0.0.0-pr-26482-1bdb7bd
To request a new release for this pull request, mention someone from the Nx team or the |
@JamesHenry Thanks so much for your work on this! How do I upgrade an existing workspace to this PR release? I've tried
|
@pcopley We maybe need to look into special handling in There aren't any migrations involved here in this PR though, so I would just |
Hey @JamesHenry 👋 Yes, I've tested release in GHE, and it went smoothly (in our case with both previous and latest commits) |
Watching this for when it gets merged. Tested the package above and works on our GHE instance 👍 |
I'm still waiting to hear back from @Bare1337 regarding the regexp. Did you not run into this @xalechez and @ryan-bendel? |
@JamesHenry - I saw no issues on our GHE server, but not sure how they would have presented? I opted to edit the release notes prior to posting, so will give it a try creating the release "as is" |
Actually I ran into the issue today. :) Do you want me to test this PR?
|
No, I guess our GHE URL satisfies the regex in question |
I did actually run into an issue when trying to publish the release:
(that's when i don't choose to open in browser to edit the generated release notes) I've not updated any of the other NX packages though, i've only updated |
@ryan-bendel In general I would always say that you should align the Interesting in your case here though regarding editing the changelog vs not. Is there a reason to hide the repo URL? That's the all important thing here so without it we can't dig in much further... Security through obscurity won't be doing much for a GHE instance I don't think, but if you feel more comfortable you can DM me the info: https://x.com/MrJamesHenry |
I'll bump all my version to match 👍 My config is: "createRelease": {
"apiBaseUrl": "https://github.atcloud.io/api/v3/",
"hostname": "github.atcloud.io",
"provider": "github-enterprise-server"
}, And the repo url it mentions is |
Thanks @ryan-bendel and just to check, when you said edit the release notes before publishing in the successful case, were you referring to the local code editor workflow, or actually using the GitHub UI for editing the release notes? What are you using for auth? An env var? Or a |
No prob @JamesHenry - Github UI was when it had "worked". That error is thrown prior to the prompt Auth is via |
@ryan-bendel That sounds like the auth is not working for you as expected for nx release then. Here you can see our logic for attempting to reuse the nx/packages/nx/src/command-line/release/utils/github.ts Lines 307 to 341 in 28a0bb3
The Please can you step through that logic in your Many thanks |
Oh wait, ha - no sooner did I post that than I realized we are explicitly checking for github.com in there :D @ryan-bendel Please can you confirm in your relevant gh hosts.yml file on your machine your token is stored under an entry that matches your |
@JamesHenry - got it working now by setting
I can't see the token itself in there (I think the token is stored in the credentials store?)
But doing a
I've tested adding that token to my |
Ok thanks for confirming, I think then we can potentially add some additional handling for non github.com cases in the auth logic - we know we won't find the token in this case, so we can get folks to always use the env var method. |
Sounds like a plan @JamesHenry - nothing a bit of documentation can't sort out. And tbh, it's a bit of an easier dev experience getting teams/users to generate a personal access token and sticking it in their Thanks for looking into it with me! 👍 |
Is it also possible to add interactive/manual support for Github release creation? https://github.com/release-it/release-it?tab=readme-ov-file#github-releases
WDYT? |
@matinzd That is the exact thing we are discussing ( |
Yeah I missed those replies 👍 |
Is there a targeted release for this change? |
I have just brought the branch up to date with the latest. I believe the remaining minor TODOs are:
Update: all addressed in 60b4f00 This PR is now just pending review from the team |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
GitHub Enterprise Server is not supported by
nx release
.Expected Behavior
GitHub Enterprise Server is supported by
nx release
.Related Issue(s)
Fixes #