Commit graph

10 commits

Author SHA1 Message Date
Mislav Marohnić
42155c7d2d Export more IDs in issue/pr JSON payload 2021-05-18 18:19:28 +02:00
Mislav Marohnić
c50d390cf5 Fix tests 2021-05-07 22:09:58 +02:00
Mislav Marohnić
9bdc63c4ca Eliminate API overfetching in pr commands
This completely rewrites the PR lookup mechanism so that the caller
must specify the GraphQL fields to query for each PR. Additionally, this
fixes some export problems with `pr view --json`.

Features:

- Each pr command now gets assigned a concept of a Finder. This makes it
  easier to stub the PR in tests without having to stub the underlying
  HTTP calls or git invocations.

- `pr view --web` is much faster since it only fetches the "url" field.

- `pr diff 123` now skips a whole API call where a whole PR was
  unnecessarily preloaded just to access its diff in a subsequent call.

- PullRequestGraphQL query builder is now used to construct queries.

- A bunch of individual commands are now freed of having to know about
  concepts such as BaseRepo, Branch, Config, or Remotes.
2021-04-30 20:34:36 +02:00
Cristian Dominguez
8a0d5b0e43 Add note about current branch detection 2021-04-13 12:30:07 -03:00
Cristian Dominguez
8bfe64d593 Accept --body-file flag if --body is supported 2021-03-15 15:12:41 +01:00
Sam
a49654970c
Merge pull request #3024 from cli/normalize-pr-commands
Normalize pr command arguments
2021-02-26 10:31:06 -08:00
Sam Coe
9d062ed8fc
Normalize pr command arguments 2021-02-23 09:17:35 -08:00
boonhong
732e919a83 Add pr edit --base to change the base branch of a PR 2021-02-24 00:15:04 +08:00
Sam Coe
4fdf28d8a4
Change behavior of slice flags for issue edit and pr edit commands 2021-02-12 14:42:21 -08:00
Sam Coe
a47ee660a7
Pr edit command 2021-02-12 10:08:44 -08:00