Commit graph

180 commits

Author SHA1 Message Date
Shubhankar Kanchan Gupta
bb6851c88b
Add "open" qualifier when listing open issues/PRs (#1457) 2020-07-31 18:22:08 +02:00
vilmibm
245c3c7425 move survey helper and test helpers to prompt pkg 2020-07-27 17:00:09 -05:00
vilmibm
fa928489b6 collapse open/draft state 2020-07-20 15:55:40 -05:00
vilmibm
f30f931695 fix tests 2020-07-20 15:55:37 -05:00
vilmibm
bffcbce716 restore nontty + web but suppress informational prints 2020-07-20 13:04:17 -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ć
0528145159 Allow filter values with spaces in issue/pr list --web 2020-07-16 15:21:50 +02:00
Mislav Marohnić
8626befd3f Merge remote-tracking branch 'origin' into webInList 2020-07-16 14:51:34 +02:00
Mislav Marohnić
305cd290ee Fix pr checkout <owner>:<branch> when it matches the default branch
First, consolidate the functionality between `pr merge` and `pr
checkout` that resolves the default branch name of the base repo. With
an added bonus, the new approach avoids an API request when one isn't
necessary.

Then, ensure that checking out 3rd-party PRs will result in local branch
name such as `<owner>/<branch>` when the head branch of the repository
matches the default branch of the base repository. We already have had
code in place to take care of this, but it only took effect in the `pr
checkout <number>`-style invocation.
2020-07-15 15:35:42 +02:00
AliabbasMerchant
4304b9e3eb filterOptions struct for pr & issue list 2020-07-14 10:26:32 +05:30
AliabbasMerchant
73552ae75c Merge 'trunk' in webInList 2020-07-14 08:53:39 +05:30
Mislav Marohnić
13b9c98b2b Match named queries in test stubs 2020-07-10 20:04:54 +02:00
Sibi
2491e98c41 Title of the PR will be shown while closing, merging and re-opening & test cases updated 2020-07-08 12:22:38 +05:30
AliabbasMerchant
8f1aa9c864 Remove flag from PR list 2020-06-30 19:45:04 +05:30
AliabbasMerchant
77a610f071 Tests for --web flag in issue and pr list 2020-06-28 23:17:57 +05:30
Mislav Marohnić
ab903bdfc0
Merge pull request #1155 from metalogical/FIX-detached-head
fix regression in support for detached HEAD state
2020-06-24 17:01:22 +02:00
naman
fb7b01b40c resolve PR review 2020-06-11 17:05:25 -07:00
Ben Wells
a89f45b1ed Validate pr and issue limit flag 2020-06-10 21:42:38 +01:00
Corey Johnson
f490a4914f Don't need extra determineBaseRepo call 2020-06-04 10:30:41 -07:00
Corey Johnson
4b03cb112c Update test stubs 2020-05-27 09:21:02 -07:00
Corey Johnson
3122696140
Merge pull request #982 from cli/remote-delete
Remote delete
2020-05-26 09:10:12 -07:00
Corey Johnson
6c5c7cf163 fix test 2020-05-26 08:37:53 -07:00
Corey Johnson
be5fc07928
Merge pull request #899 from cli/merge-interactive-merge
Interactive merge
2020-05-26 08:33:47 -07:00
Corey Johnson
9c075abe93 Fix tests 2020-05-22 17:45:04 -07:00
Corey Johnson
e643765027 Merge remote-tracking branch 'origin/merge-interactive-merge' into remote-delete 2020-05-22 15:09:29 -07:00
Corey Johnson
b2c1b12bee Don't delete branch if the repo flag is used 2020-05-22 14:39:53 -07:00
Corey Johnson
ae70a814bd Update tests 2020-05-20 14:53:52 -07:00
Corey Johnson
b4783dd192 don't always switch to the default branch 2020-05-20 09:00:39 -07:00
Corey Johnson
c3c3058b96 Merge remote-tracking branch 'origin/master' into merge-interactive-merge 2020-05-20 08:30:17 -07:00
Mislav Marohnić
fb63efcf05 Avoid crash around "DISMISSED" or "PENDING" reviewer states 2020-05-20 14:59:40 +02:00
Corey Johnson
fde5409a70
Update command/pr_test.go
Co-authored-by: Billy Griffin <5091167+billygriffin@users.noreply.github.com>
2020-05-18 14:40:04 -07:00
Corey Johnson
be927b34ae
Update command/pr_test.go
Co-authored-by: Billy Griffin <5091167+billygriffin@users.noreply.github.com>
2020-05-18 14:39:52 -07:00
Corey Johnson
78bc7260e0 Add closed test 2020-05-18 13:08:57 -07:00
Corey Johnson
0b0070e725 Add "already marked" test 2020-05-18 13:03:43 -07:00
Corey Johnson
350b4c85c0 Add failing test 2020-05-18 11:11:02 -07:00
Corey Johnson
ea164a8d48 Fix test 2020-05-15 10:52:26 -07:00
Corey Johnson
ad3a5903b2
Merge pull request #873 from cli/the-merge-dubai
Add support for `gh pr merge`
2020-05-12 10:18:54 -07:00
Corey Johnson
6e01081899 Add test for --delete-branch
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-05-12 09:47:31 -07:00
Corey Johnson
214be16d42 Add test for mutually exclusive flags
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-05-12 09:30:19 -07:00
Corey Johnson
f0cd830170 Fix merge flag
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-05-12 09:22:37 -07:00
Corey Johnson
2328dffd97 Add test
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-05-12 09:11:15 -07:00
Corey Johnson
9187efdc92 Merge remote-tracking branch 'origin/master' into merge-interactive-merge 2020-05-12 08:53:09 -07:00
Corey Johnson
326b678b24 Add delete branch
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-05-12 08:51:22 -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
Corey Johnson
ea6b3dca8c Update pr_test.go 2020-05-07 10:52:30 -07:00
Corey Johnson
3d21a33bac update test 2020-05-06 11:47:43 -07:00
Corey Johnson
8c85e14bac Make it work without a PR number 2020-05-06 11:19:00 -07:00
Corey Johnson
062c8353eb Add 'already merged' test 2020-05-05 15:11:06 -07:00
Corey Johnson
8681e7a7b6 Make squash and rebase work 2020-05-05 15:09:02 -07:00