Commit graph

173 commits

Author SHA1 Message Date
Mislav Marohnić
112ca8bf91 Merge remote-tracking branch 'origin' into docs-improvements 2022-02-21 15:24:18 +01:00
Mislav Marohnić
286ba5e8dc issue/pr list: clarify search syntax 2022-02-18 18:39:30 +01:00
Mislav Marohnić
57f49d9f8a issue/pr comment: improve docs as it relates to editor 2022-02-18 18:38:44 +01:00
Mislav Marohnić
19563c4a74 Use StringEnumFlag helper in more places 2022-02-18 12:52:47 +01:00
Christian Gregg
c5dbf20ed4
Alias list as ls for all commands (#5214)
I always get tripped up whenever trying to list my codespaces, adding
`ls` as an alias to `list` feels natural enough.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-02-17 13:53:42 +01:00
Mislav Marohnić
4a3ef50d2d
Standardize pager output across commands (#5141)
Add pager functionality to the following commands:
- gist list
- pr checks
- release list
- run list
- run view
- secret list
- workflow list
- workflow view

Additionally, normalize error handling when starting the pager has
failed: only print a non-fatal notice to stderr instead of aborting the
whole command.
2022-02-01 08:36:51 +01: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
Mislav Marohnić
4340c65ad9
Merge pull request #5040 from cli/issues-by-milestone-fix
Fix filtering issues by milestone
2022-01-21 14:47:40 +01:00
Mislav Marohnić
e43cb2b880 Port more legacy stubs to the new ask stubber 2022-01-14 19:34:15 +01:00
Mislav Marohnić
d23460a590 Fix filtering issues by milestone
The milestone filter in the `Repository.issues` GraphQL connection is
broken, so switch to the Search API for any milestone filtering.

Previously, we used to work around this by obtaining the milestone
database ID from decoding the GraphQL ID, but that no longer works since
the GraphQL ID format has changed.
2022-01-14 15:06:33 +01:00
Mislav Marohnić
456d55ead9 Have a single Render function handle all Markdown rendering 2022-01-13 19:39:43 +01:00
Mislav Marohnić
db50b54513 Simplify GraphQL mutations whose response we are not interested in 2021-12-08 13:35:19 +01:00
Des Preston
886f5e0e78 Avoid race condition when updating labels
Update labels using the `addLabelsToLabelable` and
`removeLabelsFromLabelable` mutations instead of via the `updateIssue`
mutation that replaces the entire set of labels. This prevents the edit
operation from clobbering any unseen changes to the list of labels.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-08 13:29:47 +01:00
Mislav Marohnić
34fc5fb75c Improve issue view re: overfetching, PR support
- Supports passing a PR as argument, not just issues
- Makes it non-fatal when project cards were not able to load
- Cleans up legacy method for fetching issues
2021-11-24 18:49:36 +01:00
Mislav Marohnić
3cf3d6d2d4 Avoid overfetching in non-interactive issue edit 2021-11-23 21:10:37 +01:00
Mislav Marohnić
c8d5a6be02 Accept pull requests in issue edit argument 2021-11-23 20:39:19 +01:00
Mislav Marohnić
b75e705840 Remove overfetching from issue transfer 2021-11-23 19:39:40 +01:00
Mislav Marohnić
5be6b67ce7 Remove overfetching from issue delete 2021-11-23 19:39:40 +01:00
Mislav Marohnić
f99a149eb2 Improve issue reopen re: overfetching, handling PRs
- `issue reopen` no longer fetches all issue fields and thus avoids the
  problem when loading failed due to token not having access to projects

- `issue reopen` now accepts either issue or pull number as argument.
2021-11-23 19:39:40 +01: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ć
1eb790cacd Improve issue comment re: overfetching, handling PRs
- `issue comment` no longer fetches all issue fields and thus avoids the
  problem when loading failed due to token not having access to projects

- `issue comment` now accepts either issue or pull number as argument.
2021-11-23 16:40:14 +01:00
Sam Coe
260716a9f8
Repace shurcool/graphql with cli/shurcool-graphql 2021-11-17 12:57:43 -08:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Reto Hablützel
f6e9734f17 add more hints to docs 2021-09-25 08:38:26 +02:00
Mislav Marohnić
619333adb6 Avoid using error values to pass information about the search cap 2021-09-06 16:09:18 +02:00
Des Preston
e8b015b80d show warning when limit exceeds search api max
Fixes #3839
2021-09-06 16:05:11 +02:00
Mislav Marohnić
e0fa56dc29 Merge remote-tracking branch 'origin' into go-module-v2 2021-09-02 20:02:16 +02:00
Luke
1102de89be add quotes around @me in documentation to ensure examples work on powershell 2021-08-30 09:13:43 -05:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Heath Stewart
e2973453b5
Add helper template functions for rendering tables (#3519)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-08-23 21:00:25 +02:00
Heath Stewart
88af63d36f
Re-enable label colors for issue list (#4106)
* Re-enable label colors for issue list
* Drop parentheses wrapping issue labels
* Support ANSI escape codes in TablePrinter cells
* Switch to a Truncate implementation that correctly measures ANSI escape codes
* Only output RGB color if terminal has truecolor capabilities
* Enable `ENABLE_VIRTUAL_TERMINAL_PROCESSING` on Windows - fixes wrapping issues with full lines and allows truecolor rendering

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-08-23 19:55:12 +02:00
Mislav Marohnić
930ee60ac5 Disable colorizing labels in issue list output
- Labels with dark color are not visible on a dark background
- "Raw" `issue view` output should never output color, not even with
  CLICOLOR_FORCE=1
2021-08-03 16:02:16 +02:00
Mislav Marohnić
db8204dc56 Allow space to be added after completing issue/pr list --state values
The "nospace" directive instructs the shell completion logic to avoid
adding a space after completing the word. However, this feature was
broken in an older Cobra, and users still saw a space character added.
In most case we want the space because we anticipate that the user might
want to add extra arguments to the command.
2021-07-21 16:12:38 +02:00
bchadwic
47314a6bbc modified HexToRGB to check whether terminal and gh have color enabled, as well as created tests for HexToRGB 2021-07-03 17:09:25 -07:00
bchadwic
af2499cb69 renamed func RGB to HexToRGB 2021-06-29 22:35:23 -07:00
bchadwic
4c412bc88c Added in label rgb functionality for both prs and issues 2021-06-29 22:26:41 -07:00
Sam Coe
1302b71fa7
linter 2021-06-22 11:41:22 -07:00
Sam Coe
e0468dbb29
whitespace 2021-06-22 11:39:47 -07:00
autopp
0179651dc3
Add shell completion for the --state flag 2021-06-20 20:03:21 +09:00
Mislav Marohnić
606deaf134 Allow setting empty body via editor in issue/pr create 2021-06-04 21:50:51 +02:00
jack1142
184149b844
Add missing new line 2021-06-01 23:53:58 +02:00
jack1142
42333bb2d1
Update issue non-tty view formatting and its tests 2021-05-29 04:44:48 +02:00
jack1142
979ec9298d
Update issue tty view formatting and its tests 2021-05-29 04:44:48 +02:00
Gowtham Munukutla
e160dd3eae
fix listing of PRs when merged ones are searched (#3730)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-05-28 10:11:12 +00:00
Mislav Marohnić
4425365004 Add release view --json support 2021-05-18 19:40:28 +02:00
Mislav Marohnić
42155c7d2d Export more IDs in issue/pr JSON payload 2021-05-18 18:19:28 +02:00
Mislav Marohnić
e758f30073 Fix preloading of pr reviews, checks, and issue/pr comments 2021-05-18 17:13:27 +02:00
Mislav Marohnić
5f0301c990 Have Exporter.Write automatically call ExportData on given data structure 2021-05-12 17:05:15 +02:00
Cristian Dominguez
2f94adabb2
Use T.TempDir for temporary dirs in tests (#3580) 2021-05-07 12:21:26 +02:00
Cristian Dominguez
6b49e21295 Improve issue status detection 2021-04-28 00:30:21 -03:00