Commit graph

14 commits

Author SHA1 Message Date
Cristian Dominguez
d8ce615252 Remove unused method from httpmock package 2021-06-14 09:39:14 -03:00
Cristian Dominguez
ce151420f3 Migrate legacy tests 2021-01-11 21:07:19 -03:00
Cristian Dominguez
21a57d9253 Remove unused methods 2021-01-04 07:35:41 -03:00
Mislav Marohnić
7a8db80420 Prompt for push target during pr create
We no longer guess the head repository using heuristics; instead, we
present the user with the choice of pushable repositories and an
additional option to create a new fork.

The new `pr create --head` flag is available for the user to specify the
head branch in `branch` or `owner:branch` format and completely skip any
forking or auto-pushing checks.
2020-09-16 14:49:36 +02:00
vilmibm
ec25b735ab gh auth status 2020-08-11 15:58:00 -05:00
vilmibm
35f18b6c02 gh auth login 2020-08-06 12:43:35 -05: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
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
Mislav Marohnić
1ca3d171e6 Tweak HTTP 422 handling when deleting branches 2020-06-30 19:21:39 +02:00
Pavel Borzenkov
aa8f8e8904 httpmock: propagate original HTTP request to HTTP response
So that it's possible to access it in mocked HTTP tests.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2020-06-27 18:47:06 +03:00
Mislav Marohnić
6d57f2a91e Faster resolve GraphQL node IDs for assignees, reviewers, and labels 2020-05-12 15:33:51 +02:00
Mislav Marohnić
0a4d4ee007 Replace FakeHTTP with httpmock which is now compatible 2020-05-07 15:19:14 +02:00
Mislav Marohnić
1d4065e4c4 Add a HTTP mocking interface that matches incoming requests
This adds a thread-safe RoundTripper that can be used for mocking HTTP
requests in tests. Incoming requests are matched based on their
contents, not the order the stubs were registered in.
2020-05-06 22:03:32 +02:00