fix(core): cnw sends correct selectedRepositoryName; prints instructions when user Ctrl+C#33699
fix(core): cnw sends correct selectedRepositoryName; prints instructions when user Ctrl+C#33699
Conversation
…f users kills the process
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit 71197e8
☁️ Nx Cloud last updated this comment at |
## Current Behavior When running `create-nx-workspace` with GitHub push flow, the Nx Cloud onboarding URL does not include the repository name. This is because `getVcsRemoteInfo()` is called before `pushToGitHub()` creates the git remote, and it runs in the wrong directory (cwd instead of the new workspace). ## Expected Behavior The onboarding URL should include the repository name so Nx Cloud can auto-detect the repo when users click the connect link. ## Changes 1. Reorder operations: create onboarding URL after git push completes 2. Add optional `directory` parameter to `getVcsRemoteInfo()` and `createNxCloudOnboardingURL()` so CNW can pass the workspace path 3. Remove `connectUrl` from `initializeGitRepo()` call (no longer needed in commit message) ## Related Issue(s) Fixes CLOUD-3976 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
| forceManual = false, | ||
| forceGithub = false | ||
| forceGithub = false, | ||
| directory?: string |
There was a problem hiding this comment.
This is needed during CNW, since the process.cwd() is not where the Nx workspace is. During nx connect or nx init it was fine but CNW never worked to find git remote info.
|
|
||
| if (connectUrl) { | ||
| // Create onboarding URL AFTER git operations so getVcsRemoteInfo() can detect the repo | ||
| let connectUrl: string | undefined; |
There was a problem hiding this comment.
Had to move the createNxCloudOnboardingUrl function to after GitHub repo is (potentially) pushed. Otherwise, the remote info will never exist.
In the future we can see if passing the directory name and GitHub username (if we can get it from gh) are good fallback options.
…ons when user Ctrl+C (#33699) This PR adds `SIGINT` handling when user kills the process via `Ctrl+C` during CNW. This only prints when the workspace setup is complete, and we also print the Cloud onboarding URL if it has been set up. Also fixes an issue where `selectedRepositoryName` is never sent during CNW. --------- Co-authored-by: Claude <noreply@anthropic.com>
|
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. |
This PR adds
SIGINThandling when user kills the process viaCtrl+Cduring CNW. This only prints when the workspace setup is complete, and we also print the Cloud onboarding URL if it has been set up.Also fixes an issue where
selectedRepositoryNameis never sent during CNW.