Commit graph

115 commits

Author SHA1 Message Date
Devon Romanko
5d23f116c9 removed no longer used CmdStubber 2021-01-23 08:22:14 -05:00
Mislav Marohnić
fc77cbc964 Deprecate test.ExpectLines
For asserting command output, exact string matches are preferred in most cases. In cases when a pattern match is needed, the test can use regexp ad hoc.
2021-01-18 23:25:45 +01:00
Mislav Marohnić
411bd4a70e 🔥 unused test/fixtures/ 2021-01-18 22:53:03 +01:00
Mislav Marohnić
c308f1cd91 Prevent further use of SetPrepareCmd and InitCmdStubber 2021-01-18 22:44:53 +01:00
Mislav Marohnić
172ea2b078 Isolate all alias commands 2020-08-11 13:57:48 +02:00
Mislav Marohnić
c00fe73d5a Isolate issue commands 2020-08-07 00:27:55 +02:00
Mislav Marohnić
82661c197e Isolate pr list command 2020-08-04 18:38:06 +02:00
Mislav Marohnić
3ac73297eb Isolate pr status command 2020-07-31 19:07:30 +02:00
Mislav Marohnić
74b191d0f7 Isolate pr view command 2020-07-31 14:19:09 +02:00
vilmibm
f3eb092d7e isolate repo fork command and tweak usage
This commit is another isolation refactor, this time for repo fork.
However, I got fed up with the --remote="true|false|prompt" style of
flags and took this opportunity to switch to a set of bool flags:

--remote and --clone
--no-remote and --no-clone

the string args were really non standard and confusing; with only two
bools it was impossible to tell when to prompt.
2020-07-27 13:04:31 -05:00
vilmibm
c34054bdc8 isolate repo create command 2020-07-24 12:26:27 -05:00
vilmibm
05419e46f0 put gist fixture file into gist package 2020-07-22 10:36:12 -05:00
vilmibm
168bd33bc9 pr command scriptability improvements
This commit improves behavior and error handling for pr commands when
run unattached to a tty.

- error if pr create and no -t/-f
- error if pr create and -w
- machine readable pr list
- machine readable pr view
- various cleanup of informational messages
2020-07-20 13:04:17 -05:00
Mislav Marohnić
13b9c98b2b Match named queries in test stubs 2020-07-10 20:04:54 +02:00
Corey Johnson
be5fc07928
Merge pull request #899 from cli/merge-interactive-merge
Interactive merge
2020-05-26 08:33:47 -07:00
Nate Smith
9ebeb5fa91
Merge pull request #981 from cli/gist-create
gh gist create
2020-05-25 14:51:32 -05:00
Mislav Marohnić
fb63efcf05 Avoid crash around "DISMISSED" or "PENDING" reviewer states 2020-05-20 14:59:40 +02:00
vilmibm
ed1a3a60fd Merge remote-tracking branch 'origin/master' into wingkwong/master 2020-05-13 13:43:09 -05:00
Corey Johnson
f0cd830170 Fix merge flag
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-05-12 09:22:37 -07:00
Nate Smith
5ba3baa3c8
Merge pull request #762 from doi-t/reviewers-in-pr-view
Add Reviewers to pr view in CLI
2020-05-08 14:46:08 -05:00
Mislav Marohnić
93c61a83b2 Fix pr status -R crash with closed PR on the default branch
At the time we have a reference to `baseRepo`, we might still not have
contacted the API nor obtained any information about the default branch
for the repository. This expands the `PullRequests()` query to always
report the default branch so we may choose how to render entries that
belong on the current branch.
2020-05-07 20:53:03 +02:00
Toshiya Doi
d2d0b47ecc Merge branch 'master' into reviewers-in-pr-view 2020-04-30 00:31:04 +09:00
rista404
a2a6036c65
Add tests 2020-04-25 23:12:51 +02:00
Toshiya Doi
1ce09ff758 Merge branch 'master' into reviewers-in-pr-view 2020-04-22 22:00:02 +09:00
Toshiya Doi
67907c8b00 Support ghost reviews in pr view 2020-04-22 21:59:09 +09:00
Toshiya Doi
d70358ea34 Support GitHub Team in requested reviewers 2020-04-22 21:58:01 +09:00
Nate Smith
c670049ce7
Merge pull request #745 from doi-t/add-metadata-to-view
Add relevant metadata to issue view in CLI
2020-04-09 16:27:07 -05:00
Toshiya Doi
2df5281f2f Merge branch 'master' into reviewers-in-pr-view 2020-04-10 04:46:05 +09:00
Toshiya Doi
6223a2c198 Puts completed reviews before review requests and sort reviewer names alphabetically 2020-04-10 01:16:43 +09:00
Toshiya Doi
6d0e5bf2b8 Remove Participants related codes for pr view` 2020-04-10 01:02:51 +09:00
Toshiya Doi
054ec3c635 Remove Participants related codes 2020-04-10 00:56:45 +09:00
Toshiya Doi
531bfbc295 Update unit tests for PR metadata 2020-04-08 20:07:19 +09:00
Toshiya Doi
cef525a0a2 Update unit tests for PR metadata 2020-04-08 16:27:10 +09:00
Toshiya Doi
9169c8d0eb Update unit tests for issue metadata 2020-04-08 14:48:08 +09:00
Toshiya Doi
85d8f808f2 Test pr metadata in CLI preview 2020-04-04 13:14:34 +09:00
Toshiya Doi
1279131f0f Simplify issue struct avoiding to sue edges 2020-04-04 11:28:52 +09:00
Toshiya Doi
8c697a0d99 Test issue metadata in CLI preview 2020-04-04 11:28:52 +09:00
Mislav Marohnić
e10ccefaf5
Merge pull request #667 from doi-t/view-the-current-state
Show the state (open, closed, merged) in issue view and pr view
2020-04-03 19:41:29 +02:00
Mislav Marohnić
734497a8d8
Code fixes informed by golangci-lint failures (#738) 2020-04-03 16:33:34 +02:00
Toshiya Doi
0095fe9a13 Merge branch 'master' into view-the-current-state 2020-04-02 23:52:41 +09:00
vilmibm
eb403a3b1e more nuanced error typing 2020-03-27 11:35:39 -05:00
vilmibm
ca99096ca8 use CmdError in StubError and fix git_test 2020-03-26 15:32:31 -05:00
vilmibm
f4b8851011 Merge remote-tracking branch 'origin/master' into pr-status-no-commits 2020-03-25 12:00:58 -05:00
vilmibm
dd1e2a2dfc add StubError to CmdStubber 2020-03-24 14:19:35 -05:00
vilmibm
88cf6ce16e consolidate CmdStubber into test package 2020-03-23 16:36:24 -05:00
vilmibm
633ccddb7a remove unused test helper 2020-03-23 16:30:25 -05:00
vilmibm
ff96f48479 add ExpectLines helper 2020-03-20 16:26:49 -05:00
Toshiya Doi
0ba0a0757d Merge branch 'master' into view-the-current-state 2020-03-20 18:16:47 +09:00
Nate Smith
51eb2cb345
Merge branch 'master' into pr-count 2020-03-18 09:26:05 -07:00
Toshiya Doi
a2d3923d21 Add unit tests for Closed and Merged states of the current branch 2020-03-18 21:35:06 +09:00