Commit graph

23 commits

Author SHA1 Message Date
William Martin
64370ce73e Cleanup run command stubbed finders in tests 2025-05-02 14:48:52 +02:00
Andy Feller
3bb5f54073 Apply first round of owner/repo#number consistency
This commit expands on @nobe4 initial work by bringing the owner and repository name to the most obvious issue and PR number output use cases before making a second pass for any edge cases.
2024-03-01 14:03:18 -05:00
Yukai Chou
17d336e005 Wrap cli flags in backticks uniformly 2023-11-16 22:54:27 +08:00
Ariel Deitcher
49f6b20d3d
Add undo option to pr ready command to convert PR to draft (#5995) 2022-09-21 19:00:13 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Kevin Lee
0d143ca89c
Consistent punctuation in command usages (#5139)
* Fix spelling and grammatical errors in command docs
* Add periods for consistency across the long command descriptions
* Format imports
2022-01-31 10:56:12 +00:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
stdtom
9468e9e7df
Fix copy/paste mistake in docs 2021-10-21 12:34:20 +02:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +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
Nate Smith
d09896468d
Merge pull request #3351 from cristiand391/fix-pr-reopen
Fix detecting PR status when passing branch as arg
2021-04-20 11:41:16 -05:00
Cristian Dominguez
8a0d5b0e43 Add note about current branch detection 2021-04-13 12:30:07 -03:00
Cristian Dominguez
a8921162b1 Update tests 2021-04-08 00:27:52 -03:00
Cristian Dominguez
9c471fe7a5 Improve PR status detection 2021-04-08 00:23:22 -03:00
Mislav Marohnić
f46bab256c Rename to SuccessIconWithColor 2021-01-25 14:56:39 +01:00
Mislav Marohnić
23d68705bc Match color of the success icon with the end state of the record 2021-01-22 23:55:33 +01:00
Cristian Dominguez
ce151420f3 Migrate legacy tests 2021-01-11 21:07:19 -03:00
vilmibm
46a1598c19 favor SuccessIcon 2020-11-02 11:13:28 -08:00
vilmibm
a2aa154794 port entirely to ColorScheme 2020-10-29 12:37:45 -07:00
Mislav Marohnić
c21caf5b2b Disallow pr -R flag for commands that operate on the current branch
If the `--repo` flag is specified, then the user intends to select a
repository other than the current one. In that case, it doesn't make
sense to fall back to detecting the PR belonging to the current branch,
so throw a descriptive error instead.
2020-08-27 16:30:34 +02:00
Mislav Marohnić
6490d7717c Fix --repo override taking effect for pr commands 2020-08-06 21:39:46 +02:00
Mislav Marohnić
5404fb2362 Wrap up migrating all pr commands 2020-08-06 21:21:35 +02:00