Skip to content
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

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

nkgentile
Copy link
Contributor

Description

Adds a --yes (or -y) flag to the undeploy command, enabling unattended mode:

sanity undeploy --yes

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.

@nkgentile nkgentile requested a review from a team as a code owner December 21, 2024 21:13
@nkgentile nkgentile requested review from ricokahler and removed request for a team December 21, 2024 21:13
Copy link

vercel bot commented Dec 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 24, 2024 6:25pm
performance-studio ✅ Ready (Inspect) Visit Preview Dec 24, 2024 6:25pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Dec 24, 2024 6:25pm

Copy link

vercel bot commented Dec 21, 2024

@nkgentile is attempting to deploy a commit to the Sanity Sandbox Team on Vercel.

A member of the Team first needs to authorize it.

@nkgentile nkgentile force-pushed the feature/add-unattended-mode-for-undeploy branch from d5c39c8 to 84431a2 Compare December 22, 2024 19:18
@nkgentile nkgentile changed the title feat: add unattended mode flag to sanity undeploy feat(cli): add unattended mode flag to sanity undeploy Dec 22, 2024
*/
const unattendedMode = Boolean(flags.yes || flags.y)

// If it is in unattended mode, we don't want to prompt
Copy link
Member

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?

Copy link
Contributor Author

@nkgentile nkgentile Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants