node-gh / gh

(DEPRECATED) GitHub CLI made with NodeJS. Use the official https://cli.github.com/ instead.
http://nodegh.io
Other
1.71k stars 217 forks source link

Add a confirmation before opening new issue #534

Open wigust opened 6 years ago

wigust commented 6 years ago

Hello, Could you add a confirmation input similar to $ git send-email for gh issue foo? So in order to open new issue you should type y or n to reject. Also a flag -y to run it non-interactively.

protoEvangelion commented 6 years ago

@wigust Do you see this as applying only when opening an issue?

Or could you see this being used in other use cases like commenting on an issue or PR?

wigust commented 6 years ago

@protoEvangelion, I'm not sure about other use cases, because e.g. commenting on an issue requires to type a specific flag. But to be more identical in commands for online activity which creates something on GitHub a necessity of -y flag to send without asking is a good idea.

I'm sure it would be nice in case of gh pull-request MESSAGE and gh issue MESSAGE.

protoEvangelion commented 6 years ago

Hmm... I definitely like the pattern of using -y for non interactive mode, but I would be hesitant to change the UX to require user feedback for each main action like sending PRs or creating new issues.

The main reason for that is because a lot of people use gh ... in aliases or scripts and this type of functionality would break their scripts if they don't include -y.

Any ideas on how to overcome that challenge?

wigust commented 6 years ago

The main reason for that is because a lot of people use gh ... in aliases or scripts and this type of functionality would break their scripts if they don't include -y.

Any ideas on how to overcome that challenge?

I think we could have a release with a warning to give people some time for a switch to new syntax. E.g.: “gh pull-request MESSAGE, gh issue MESSAGE, gh … commands syntax will change in a feature release, requiring you to specify -y flag to send non-interactively”