-
Notifications
You must be signed in to change notification settings - Fork 30
feat: Add env fork command #281
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d27d667f9c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if team: | ||
| fork_data["team_id"] = team |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Send team slug under correct request key
The --team flag is documented as a team slug, but this code places it in the team_id field. Elsewhere in this file (push) the slug is sent as team_slug and team_id is reserved for CUIDs from config, so passing a slug here will likely be rejected or mis-attributed by the API. This will make prime env fork --team my-team fail for team users unless they happen to supply a CUID. Consider sending team_slug or resolving the slug to an ID before populating team_id.
Useful? React with 👍 / 👎.
| fork_data["team_slug"] = team | ||
|
|
||
| try: | ||
| response = client.post(f"/environments/{env_id}/fork", json=fork_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong API endpoint prefix breaks fork command
High Severity
The fork command uses /environments/{env_id}/fork as the API endpoint, but all other environment-related API calls in this file consistently use the /environmentshub/ prefix (e.g., /environmentshub/{env_id}/wheels, /environmentshub/resolve, /environmentshub/{env_id}). This inconsistency likely means the fork command will fail to reach the correct API endpoint.
Summary
prime env forkcommand to fork environments via CLI--teamflag for team ownershipUsage
Depends on platform PR #76 for the API endpoint.
Note
Adds a new CLI subcommand to fork environments from the hub.
prime env forkcommand inenv.pycallsPOST /environments/{owner/name}/fork--team/-tto assign team ownership (team_slug)env pull, modify,env push)Written by Cursor Bugbot for commit 5132005. This will update automatically on new commits. Configure here.