mob
mob copied to clipboard
Warning for 'mob reset'
I see in issue #36 that it was decided to keep this. I've found "reset" useful, except we've had accidents where it was done unintentionally. If it's going to stay, a warning saying "this will Force Delete the branch on GitHub, are you sure you want to delete it for everyone?" would be handy.
I understand and share your sentiment. However, mob.sh currently follows this design concept: 'mob is not interactive.'
Not sure how to solve that.
Perhaps requiring an argument (that's not in the help docs)? e.g.:
mob reset --force-delete-branch
Could make the person more aware of what they're doing. So if they did:
mob reset
it would respond:
Executing this command deletes the mob branch for everyone. If you're sure you want that,
add --force-delete-branch as an argument:
mob reset --force-delete-branch
I like the Idea.
Would love if the argument also told that it would delete the remote branch.
mob reset --delete-remote-wip-branch
or something else.
Also I would not mind if it was mentioned in the help.
sounds reasonable.
@tedyoung, did you want to give this a try? If not, I'll help out.
It looks like the way to do this is to check for --delete-remote-wip-branch
in the case "reset"
statement in the execute
function? Then a test would be similar to TestExecuteInvalidCommandKicksOffHelp
looking for the output if you don't include it.
I don't have a Go environment setup at the moment, so may take me a few days to get to a PR. So if someone wants to do it before then, happy to review it.
done with #305 and #313
Yay! 👍