Commit graph

30 commits

Author SHA1 Message Date
William Martin
64370ce73e Cleanup run command stubbed finders in tests 2025-05-02 14:48:52 +02:00
Azeem Sajid
8b7fb231ec Remove trailing whitespace 2025-02-13 11:06:27 +05: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
Sam Coe
4294ee14a1
revert revert 57fbe4f317 (#6474) 2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression (#6472)
* Revert "Refactor to use new git client (#6447)"

This reverts commit 57fbe4f317.

* Fix pr create regression
2022-10-20 12:46:23 +03:00
Sam Coe
57fbe4f317
Refactor to use new git client (#6447) 2022-10-19 21:11:36 +03:00
ffalor
821f8ba1d2
Add error message to pr close when missing args (#5885) 2022-07-11 15:30:12 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Sam Coe
6fa8e4299c
Add ability to comment on close/reopen of issues/pull requests (#5437) 2022-04-11 17:06:35 +02:00
boonhong
a6161cb8cb pr close skips deleting local branch if not in a git repo 2022-02-26 18:03:05 +08:00
Mislav Marohnić
07cad386a5 Improve issue close re: overfetching, handling PRs
- `issue close` no longer fetches all issue fields and thus avoids the
  problem when loading failed due to token not having access to projects

- `issue close` now accepts either issue or pull number as argument.
2021-11-23 19:38:55 +01:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
42155c7d2d Export more IDs in issue/pr JSON payload 2021-05-18 18:19:28 +02:00
Mislav Marohnić
51f7cbdfde 💅 cleanup and tests for PR finder 2021-05-18 09:59:05 +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
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ć
96fa6e7830 Merge remote-tracking branch 'origin' into success-icon-consistency 2021-01-22 23:56:54 +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
Mislav Marohnić
fc77cbc964 Deprecate test.ExpectLines
For asserting command output, exact string matches are preferred in most cases. In cases when a pattern match is needed, the test can use regexp ad hoc.
2021-01-18 23:25:45 +01:00
Mislav Marohnić
c63acf6728 Migrate to new cmd stubber in misc. tests 2021-01-18 22:42:01 +01:00
Mislav Marohnić
683ebee6ef Consistently use green success icon
For operations such as closing an issue or merging a PR, we would
display the success icon (a checkmark) in red and magenta colors,
respectively, to reflect the latest state of the record operated on
(red: closed; magenta: merged).

This was always confusing to me, seeing it both in code and in the UI,
because I'm instinctively thinking that it's a bug and have to remind
myself that it's by design.
2021-01-18 19:57:38 +01:00
Cristian Dominguez
ce151420f3 Migrate legacy tests 2021-01-11 21:07:19 -03:00
vilmibm
a2aa154794 port entirely to ColorScheme 2020-10-29 12:37:45 -07:00
vilmibm
e44eb665a1 Merge remote-tracking branch 'origin/trunk' into prclose-delete 2020-08-19 21:06:04 -05:00
Mislav Marohnić
c00fe73d5a Isolate issue commands 2020-08-07 00:27:55 +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