Commit graph

87 commits

Author SHA1 Message Date
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
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
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
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
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
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
Toshiya Doi
3c4f006eff Add a test for the current branch 2020-03-13 00:24:44 +09:00
Toshiya Doi
6db7e89abf Fix indentations and PR numbers of a test fixture 2020-03-13 00:24:10 +09:00
rista404
e739d95c93 Show state instead of checks for closed/merged PRs 2020-03-09 23:59:34 +01:00
Alisson Santos
a3557197fe 2 space identation for JSON 2020-03-05 14:05:33 +01:00
Alisson Santos
dcedacd4f7 Remove duplicates 2020-03-05 13:55:36 +01:00
Mislav Marohnić
1ba577ca36 Merge remote-tracking branch 'origin/master' into pr-count 2020-03-05 12:31:05 +01:00
Nate Smith
3d7733870e
Merge branch 'master' into repo-fork 2020-03-03 15:40:54 -06: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
vilmibm
7fad2d05fb switch to alternate method for determining if repo already forked 2020-02-27 16:43:44 -06:00