vilmibm
ed8aaa83e3
add CmdStubber
2020-03-13 15:12:09 -05:00
Toshiya Doi
3c4f006eff
Add a test for the current branch
2020-03-13 00:24:44 +09:00
rista404
e739d95c93
Show state instead of checks for closed/merged PRs
2020-03-09 23:59:34 +01:00
Alisson Santos
dcedacd4f7
Remove duplicates
2020-03-05 13:55:36 +01:00
Mislav Marohnić
201217d88a
Fix detecting PR for current branch pushed to fork
...
Now passing base repo as reference to `prSelectorForCurrentBranch()` so
that it doesn't have to (inexactly) determine the base repo itself and
risk it being different than the base repo determined during `pr
status/view`.
2020-03-02 11:35:20 +01:00
Mislav Marohnić
f5b0354ae3
Fix tests
2020-02-27 12:11:49 +01:00
Myk
038e5e5342
Accept #<num> syntax as issue/PR number
2020-02-27 12:11:49 +01:00
Mislav Marohnić
861b231344
Have --state=closed include merged PRs
...
Since we currently offer no way of querying PRs by combining multiple
states with an OR, the best way to handle the `closed` state is to match
what the web UI is doing; that is to include merged PRs.
2020-02-20 13:53:44 +01:00
Anowar Islam
8f9574be35
added fix for empty body in pr preview
2020-02-13 01:43:51 -08:00
vilmibm
6732aa9725
fix tests
2020-02-12 08:48:25 -06:00
vilmibm
a998a650cd
still WIP, need to pause and refactor
2020-02-12 08:15:10 -06:00
Amanda Pinsker
1790d14c61
Update tests to reflect content change
2020-02-10 16:44:37 -08:00
vilmibm
d7bf83a82c
strip color, add whitespace
2020-01-30 14:00:43 -06:00
vilmibm
34248f9892
fix tests
2020-01-29 17:51:18 -06:00
Mislav Marohnić
a710893fc1
Rename to cli/cli
2020-01-24 16:08:52 +01:00
Mislav Marohnić
f58dd04074
Avoid saying "number as argument" for issue/pr view
...
Since issue URLs, PR URLs, and PR branch names are all accepted as arguments,
avoid explicitly requesting "number" as argument.
2020-01-23 13:09:37 +01:00
Mislav Marohnić
d2eb17b150
Fix test after copy changes
2020-01-15 12:53:52 +01:00
vilmibm
5bc6d220c4
review feedback
2020-01-13 15:32:07 -06:00
vilmibm
bbdf30c8f8
add tests for pr/issue previewing in terminal
2020-01-10 15:40:09 -06:00
Corey Johnson
f2afbbce74
Fix test output
2019-12-20 12:07:53 -08:00
Corey Johnson
58761a8dfc
Fix tests
2019-12-20 12:04:23 -08:00
Corey Johnson
8f74b658b2
Merge remote-tracking branch 'origin/master' into appropriate-context-and-feedback
2019-12-20 11:51:37 -08:00
Corey Johnson
bcf1f98702
Do a better job of reverting test changes
2019-12-20 11:32:27 -08:00
Corey Johnson
d025d2d4f3
Revert test changes
2019-12-20 11:24:03 -08:00
Mislav Marohnić
9c36c7bae9
Ensure that string flags are reset between test runs
2019-12-20 13:17:02 +01:00
Mislav Marohnić
9ddd50ffa9
Add tests for pr status reviews and checks output
2019-12-19 17:37:57 +01:00
Mislav Marohnić
fd1da2f0f0
Add test for pr status blank slate
2019-12-19 16:54:24 +01:00
Mislav Marohnić
2c1fc56967
Update output expectations
2019-12-17 13:01:45 +01:00
Mislav Marohnić
7b7c985e79
Merge remote-tracking branch 'origin/master' into appropriate-context-and-feedback
2019-12-17 13:00:10 +01:00
Corey Johnson
91267a65fa
Fix tests
2019-12-16 13:18:16 -08:00
Mislav Marohnić
48aeff1ca7
Assert stdout separarely from stderr in command tests
...
This stubs stderr separately from stdout in command tests (before those
streams were combined) and improves test assertions around output.
Additionally, no longer use the `cmd.Print*()` family of Cobra functions
because their name sounds like the text will go to stdout, but they
write to stderr instead. Use the more explicit `cmd.ErrOrStderr()` as
output destination instead.
2019-12-16 15:46:42 +01:00
Corey Johnson
2218e60264
Label as pull request
2019-12-11 10:24:58 -08:00
Corey Johnson
53ed20f32a
Fix test
2019-12-10 16:15:37 -08:00
Corey Johnson
eb414bf2a1
Add a little test
2019-12-06 14:33:04 -08:00
Mislav Marohnić
5c4a94e13a
Merge pull request #132 from github/pr-create--web
...
Add `gh pr create --web` to open a PR using web flow
2019-12-04 22:31:57 +01:00
Mislav Marohnić
fb8a7e26e6
Reset bool flags so they don't leak between tests
2019-12-04 16:47:11 +01:00
Mislav Marohnić
4e859fa7ca
Validate PR passed as pr view <url> before opening it
2019-12-03 21:45:28 +01:00
Mislav Marohnić
519e731038
Allow specifying PR URL or branch name for pr view <pr>
2019-12-03 20:52:36 +01:00
Mislav Marohnić
f87680e804
Explain multiple code paths
2019-12-03 19:52:45 +01:00
Mislav Marohnić
2621bccc44
Use RunCommand in tests to ensure flags reset between runs
2019-12-03 17:26:28 +01:00
Mislav Marohnić
723cd06b8a
Add pr list --assignee test
2019-12-03 16:01:03 +01:00
Mislav Marohnić
eff8847513
Improve detecting PR for the current branch
...
Now reads git branch configuration and handles these cases:
branch ["foo"]
remote origin
merge refs/heads/bar
branch ["foo"]
remote other-remote
merge refs/heads/foo
branch ["foo"]
remote https://github.com/OWNER/REPO.git
merge refs/heads/bar
branch ["foo"]
remote origin
merge refs/pull/123/head
2019-11-20 15:20:36 +01:00
Mislav Marohnić
508f6787f0
Have PullRequestForBranch accept "owner:branch" value for forks
...
When on a `patch-1` branch locally, `gh pr view` would happily open the
first open PR it finds with "patch-1" as its head, even those coming
from forks.
2019-11-20 15:20:36 +01:00
Mislav Marohnić
0c2d8879d1
Use OWNER:BRANCH syntax for cross-repo PRs
...
This affects `pr status` and `pr list`.
2019-11-14 16:46:59 +01:00
Mislav Marohnić
b2c06caf51
Merge remote-tracking branch 'origin/master' into pr-list
2019-11-06 19:47:05 +01:00
Mislav Marohnić
5fcda2b5b5
Merge remote-tracking branch 'origin/master' into pr-list
2019-11-06 19:45:10 +01:00
Mislav Marohnić
524fe0a69b
🔥 last instance of mockOpenInBrowser
2019-11-06 19:41:18 +01:00
Mislav Marohnić
32e36d2fe0
Merge branch 'master' into exec-cmd-error-info
2019-11-06 19:36:12 +01:00
nate smith
e3a11c8ffb
fix pr filtering
2019-11-06 18:10:22 +01:00
Mislav Marohnić
667704d574
Add pr list command
...
Old `pr list` is now `pr status`
2019-11-06 17:33:45 +01:00