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 clear success confirmation when deleting gists & repos #602

Closed protoEvangelion closed 5 years ago

protoEvangelion commented 5 years ago

We could add a simple success check mark like we do for PR builds that pass

    switch (pull.combinedStatus) {
        case 'success':
            status = logger.colors.green(' ✓')
            break
        case 'failure':
            status = logger.colors.red(' ✗')
            break
    }
Aaron-K-T-Berry commented 5 years ago

I reckon i can pick this up 👍

protoEvangelion commented 5 years ago

All you @Aaron-K-T-Berry ! The two areas to start looking are: https://github.com/node-gh/gh/blob/master/src/cmds/repo.ts#L146 https://github.com/node-gh/gh/blob/master/src/cmds/gists.ts#L80

Let me know if you could use direction in the meantime.

Aaron-K-T-Berry commented 5 years ago

I've added the messages for gists so far but I'm not sure how they should be looking.

Let me know if this is the right direction and then I can do something similar for the repos. 😀

protoEvangelion commented 5 years ago

@Aaron-K-T-Berry I like it. What do you think about adding the check or x to the front of the line so it's clearer if they delete multiple gists at a time with gh gi --delete 4252321 --delete 4252322 ?

Aaron-K-T-Berry commented 5 years ago

Yeah I like it makes it a bit easier to scan through

Deleting gist Aaron-K-T-Berry/dd2b781fae167fa5a5e67ece01686e8f
✓ Successfully deleted gist: dd2b781fae167fa5a5e67ece01686e8f
Deleting gist Aaron-K-T-Berry/ebf9ac14204571a0255bfc6cf258fc3e
✓ Successfully deleted gist: ebf9ac14204571a0255bfc6cf258fc3e

Also for the error and not deleted message are a little clearer now at a glance.

? Are you sure? This action CANNOT be undone. [y/N] n
✗ Not deleted.

Error: ✗ Can't delete gist: f7b3365a6fe447182de1a6ff7ccb6009.
protoEvangelion commented 5 years ago

Very good! Feel free to add that to repo as well. It looks great 🎉

protoEvangelion commented 5 years ago

:tada: This issue has been resolved in version 2.3.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: