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 Jan 17, 2025 0:05am
performance-studio ✅ Ready (Inspect) Visit Preview Jan 17, 2025 0:05am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Jan 17, 2025 0:05am

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.

) // User confirms

await undeployStudioAction(
{extOptions: {yes: true}} as CliCommandArguments<UndeployStudioActionFlags>,
Copy link
Member

Choose a reason for hiding this comment

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

Think you need the same thing in a few of the other failing tests in this suite

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh good call––fixed now I believe. I didn't have access to the environment variables to run these locally

@jordanl17
Copy link
Member

Hey @nkgentile, is this still an active PR? Might want to rebase if so

@nkgentile nkgentile force-pushed the feature/add-unattended-mode-for-undeploy branch from afb159b to 330d646 Compare January 16, 2025 23:56
@nkgentile nkgentile force-pushed the feature/add-unattended-mode-for-undeploy branch from 330d646 to 2ec9981 Compare January 17, 2025 00:01
@nkgentile
Copy link
Contributor Author

@jordanl17 yes, still active and I've just rebased. Ready for your review 🙇🏻

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