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

Allow for 'dry running' commands #38

Closed
JimNero009 opened this issue Apr 28, 2021 · 4 comments
Closed

Allow for 'dry running' commands #38

JimNero009 opened this issue Apr 28, 2021 · 4 comments
Labels
enhancement New feature or request pre mortem

Comments

@JimNero009
Copy link

Before committing to a change (pun absolutely intended), it is sometimes useful to validate that the changes that were made actually came out sensibly in practise.

I would like to see a configuration/environment option to commands like turbolift commit and turbolift create-prs (i.e. any write-like commands) to run them in a dry run mode. For example, the dry run commit could be a report of each git diff, and for create-prs it might be a summary of the git diff against the latest default branch.

@rnorth
Copy link
Collaborator

rnorth commented Apr 30, 2021

Absolutely, I think this is a good suggestion.

With the previous version, which had a git diff preview, many people asked about turning it off. I think it would be good to re-add this feature, but perhaps as opt-in this time?

WDYT?

@rnorth rnorth added the enhancement New feature or request label Apr 30, 2021
@JimNero009
Copy link
Author

I think I would prefer an 'end to end' dry run, rather than the step-by-step 'dry run and confirm' workflow of the previous version. This could be personal preference though, so perhaps we start there (the presence of some envar, off by default, that asks for confirmation when 'write' changes happen) and iterate upon that, re-using the functionality?

@rnorth
Copy link
Collaborator

rnorth commented May 4, 2021

Sure, I guess it's pretty doable to collate that and emit it at the end. I'd definitely suggest doing this as a flag (like --dry-run) rather than an env var, for ease of discovery.

Maybe the thing that I was thinking of (and which the bash version did) would be better described as a --review mode. I get the distinction now!

@rnorth
Copy link
Collaborator

rnorth commented Jan 29, 2024

Since this was created, #94 has come up which we think offers an alternative approach to this problem that is simpler to implement. As such, we'd like to move to close this.

@rnorth rnorth closed this as completed Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pre mortem
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants