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

gh pr testing results #11

Closed
tierninho opened this issue Oct 10, 2019 · 4 comments
Closed

gh pr testing results #11

tierninho opened this issue Oct 10, 2019 · 4 comments

Comments

@tierninho
Copy link
Contributor

tierninho commented Oct 10, 2019

Testing results for gh version 0.0.0:

gh pr list

Test cmd Result Note
basic command gh pr list shows all three areas; includes PR number, title, status, and CI check
half command gh pr Shows list of PRs to select
alpha-numeric gh pr list 11 or gh pr list aaaa still shows all three areas on the fence about this
current branch gh pr list PR is shown
PR created by you gh pr list PR is shown
code review request, open/draft PR gh pr list PR is shown
code review request, closed PR gh pr list You have no pull requests to review. Should still show?
git equivalent git pr list git: 'pr' is not a git command. See 'git --help'.

gh pr checkout

Test cmd Result Note
basic command gh pr checkout Shows list of PRs to select
closed PR, branch active gh pr checkout 1 goes to branch of PR Should we show if closed?
closed PR, branch deleted gh pr checkout 1 exit status 128 better messaging
open PR gh pr checkout 7 goes to branch of PR
invalid PR gh pr checkout 5555 HTTP 404
alpha characters gh pr checkout abcd Error: strconv.Atoi: parsing "abcd": invalid syntax better messaging
git equivalent git pr checkout git: 'pr' is not a git command. See 'git --help'.

gh pr show

Test cmd Result Note
basic command gh pr show opens PR in browser
add valid number gh pr show 2 opens PR or issue in browser Still open if an issue?
add invalid number gh pr show 222 opens 404 browser Verify in cmd line is better
add alpha gh pr show 2 Error: invalid pull request number: 'dfsd'
git equivalent git pr show fatal: ambiguous argument 'pr': unknown revision or path not in the working tree.'

gh pr create

Test cmd Result Note
basic command gh pr create asks for PR Title
PR Title left blank gh pr create, [enter] Moves to PR body field block a blank entry as ends up with HTTP 422 later
PR Title with text gh pr create, enter some text moves to PR Body field
PR Body with text, PR does not exist, has commits gh pr create, [enter], add text PR submitted ✅ , add option to open in browser?
PR Body with text, PR does not exist, no commits gh pr create, [enter], add text HTTP 422 error block this from get-go
PR Body with text, PR already exists gh pr create, [enter], add text HTTP 422 error block this from get-go
PR Body left blank gh pr create asks for PR Title
Exit Ctrl-C Yes, Edit, Cancel and discard all work fine ✅
git equivalent git pr show git: 'pr' is not a git command. See 'git --help'.

gh help

Test cmd Result Note
basic command gh help all help suggestions
rubbish command gh dfsdfsdfsdfsd Run 'gh --help' for usage.
help for help gh help --help specific help suggestion
help for PR list gh pr list --help specific help suggestion
help for showing PR gh pr show --help specific help suggestion
help for creating PR gh pr create --help specific help suggestion
git equivalent git help Git help suggestions
@mislav
Copy link
Contributor

mislav commented Oct 10, 2019

@tierninho This is really thorough, thank you!

gh pr list 11 or gh pr list aaaa | still shows all three areas | on the fence about this

The gh pr list command doesn't take any extra arguments. When you pass 11 or aaaa, the argument is ignored. Would you prefer that an error message is shown instead? We could easily do that.

Closed PR | “You have no pull requests to review” | Should still show?

Good question! For now we're focusing on open PRs only.

gh pr show 2 | Still open if an issue?

Good catch. Not sure if we should avoid opening the browser if we detect that "2" is an issue instead of a PR in this case. For now I'd vote that we leave the current behavior and see if we get user feedback on this one?


All other feedback on show, checkout, create commands: fully agree! Especially when it comes to failing fast during create instead of allowing an API call to go through and ending up with a 422 error that we could have avoided earlier. ✨

@tierninho
Copy link
Contributor Author

Would you prefer that an error message is shown instead? We could easily do that.

Let's leave alone for now see if we get user feedback on this one, too.

Good catch. Not sure if we should avoid opening the browser if we detect that "2" is an issue instead of a PR in this case. For now I'd vote that we leave the current behavior and see if we get user feedback on this one?

👍

@probablycorey
Copy link
Contributor

This is great @tierninho!

For the "Should still show?" for gh pr list I think not showing closed PRs makes sense there.

For "Should we show if closed?" for gh pr checkout 1 I think it makes sense to still allow a checkout even if the branch is closed.

@tierninho
Copy link
Contributor Author

Closing this for now as the product is evolving.

vilmibm pushed a commit that referenced this issue Jun 29, 2021
Tidied up the logic of openInBrowser
mislav pushed a commit that referenced this issue Sep 28, 2021
rename Server to Session and simplify API
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

No branches or pull requests

3 participants