-
Notifications
You must be signed in to change notification settings - Fork 435
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(cli): add unattended mode flag to sanity undeploy
#8130
base: next
Are you sure you want to change the base?
feat(cli): add unattended mode flag to sanity undeploy
#8130
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@nkgentile is attempting to deploy a commit to the Sanity Sandbox Team on Vercel. A member of the Team first needs to authorize it. |
d5c39c8
to
84431a2
Compare
sanity undeploy
sanity undeploy
*/ | ||
const unattendedMode = Boolean(flags.yes || flags.y) | ||
|
||
// If it is in unattended mode, we don't want to prompt |
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.
Q: is this comment incorrect, should it be If it is NOT in unattended mode...
, or have I misunderstood the logic?
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.
I think it's correct. I copied the wording and logic from here:
https://github.com/sanity-io/sanity/blob/ddb65fa21a42856926331635e63b17ac420d529a/packages/sanity/src/_internal/cli/actions/build/buildAction.ts#L76C1-L77C1
Description
Adds a
--yes
(or-y
) flag to theundeploy
command, enabling unattended mode:This flag is particularly useful for CI/CD workflows, such as deploying a feature branch of a Sanity Studio and automatically undeploying it when the corresponding pull request is closed.
What to review
Testing
Notes for release
Updating documentation to include new flag. The help docs for the command have been updated with an example.