Commit graph

168 commits

Author SHA1 Message Date
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
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
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
Corey Johnson
16ad382f4d Add simple merge test 2020-05-05 11:35:19 -07:00
Corey Johnson
8c9fdc768c Merge remote-tracking branch 'origin' into a-better-runcommand 2020-05-05 09:30:32 -07:00
Corey Johnson
4ef73a723d Update all calls to RunCommand 2020-05-05 09:20:01 -07:00
Nate Smith
1a1fc64fe4
Merge pull request #842 from foad/df-805-hide-closed-default
Hide closed/merged PRs from default branch
2020-05-04 20:17:53 -05:00
Daniel Foad
e7e3a4f9b1
pr comments 2020-05-04 23:47:47 +01:00
Corey Johnson
3b8f4794b4 Update test 2020-05-04 10:31:31 -07:00
Corey Johnson
4020084f02 Fix test 2020-05-01 14:54:38 -07:00
Corey Johnson
fad697cbaf Names 2020-05-01 14:18:01 -07:00
Corey Johnson
63b20baa1b Add merged test 2020-05-01 13:58:52 -07:00
Corey Johnson
b8ff489bb5 Add already open test 2020-05-01 12:07:30 -07:00
Corey Johnson
38f9e819c5 Add test for reopen 2020-05-01 12:00:02 -07:00
Corey Johnson
210c47572c Move RunCommand to testing file 2020-04-30 12:14:40 -07:00