Commit graph

103 commits

Author SHA1 Message Date
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
Toshiya Doi
cf69d7e47f Add test fixtures for viewing Draft state in CLI 2020-03-18 08:53:12 +09:00
Toshiya Doi
7ceffd0827 Merge branch 'master' into view-the-current-state 2020-03-18 08:51:04 +09:00
Toshiya Doi
762e806c9e Add tests for viewing a Draft PR in CLI 2020-03-18 08:23:29 +09:00
Toshiya Doi
9a6026e9fc Format PR/Issue states with color 2020-03-16 04:32:41 +09:00
Toshiya Doi
c8a72c3bcb Add a test for viewing an issue without labels in CLI 2020-03-16 04:26:32 +09:00
Toshiya Doi
5a23113b5b Add tests for the Closed/Merged PR preview 2020-03-16 04:21:35 +09:00
Toshiya Doi
8cd6932f9e Add a test for the closed issue preview 2020-03-16 04:12:26 +09:00
Toshiya Doi
0475cf0112 Extract test fixtures for 'issue view --preview' 2020-03-16 03:21:03 +09:00
Toshiya Doi
e0bfd67c69 Fix tests for preview messages with a issue/PR state 2020-03-16 03:13:05 +09:00
UmairShahzad
f51669e228 Merge remote-tracking branch 'origin/master' into pr-count 2020-03-14 19:02:51 +05:00
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