Commit graph

57 commits

Author SHA1 Message Date
Kynan Ware
3651c289ed Show friendly display names in gh issue view
Apply DisplayName() to author and assignee display in issue view,
consistent with the pr view changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 12:01:06 -07:00
vishnuvv27
b32b7eab39 Fix redundant API call in gh issue view --comments (#12606) 2026-02-09 15:31:55 +05:30
Andy Feller
7851c9c664 Update gh issue view to show v2 projects
These changes enhance the existing `gh issue view` experience by listing v2 projects in interactive and non-interactive forms.

Additionally, the tests have been enhanced to use a more standard `httpStubs` approach from other tests.
2025-08-12 16:18:45 -04:00
Azeem Sajid
ee281fd9ba
Add closedByPullRequestsReferences JSON field to issue view (#10941)
* [gh issue view] Expose `closedByPullRequestsReferences` JSON fields

* Incorporate GitHub Copilot review suggestions

* Incorporate review changes
2025-05-07 13:59:22 +01:00
William Martin
5ec2160bc6 Avoid requesting projectCards for issue view 2025-04-17 15:37:48 +02:00
William Martin
81ecbd8e1d Issue view early arg parsing 2025-04-17 15:27:40 +02:00
Andy Feller
47225bcf56
Merge pull request #10737 from cli/andyfeller/muted-text-part2-github-cli-833
Ensure muted text is thematic and customizable
2025-04-08 16:59:36 -04:00
Andy Feller
918cafc222 Deprecate ColorScheme.Gray for ColorScheme.Muted
This commit converts all of the places using ColorScheme.Gray and ColorScheme.Grayf to Muted and Mutedf.

There is a little extra tidying up with local variable names or converting code to use Mutedf format.
2025-04-06 10:18:48 -04:00
Andy Feller
3eca268a7f Introduce color_labels support, update commands
This commit implements the actual changes around configuration setting / environment variable logic for displaying labels using their RGB hex color code in terminals with truecolor support.

One of the subtler changes in this commit is renaming generic ColorScheme.HexToRGB logic to render truecolor to ColorScheme.Label as this feature was being used exclusively for labels.  This is due to confusion about introducing the new `color_labels` config on top of generic coloring logic.
2025-04-02 18:24:20 -04: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
afbdb945bc Small docs tweaks 2023-11-23 07:14:38 +08:00
Yukai Chou
17d336e005 Wrap cli flags in backticks uniformly 2023-11-16 22:54:27 +08:00
ffalor
31ffa6b499
Alphabetically sort labels for pr/issue view (#7587) 2023-06-20 11:30:03 +09:00
Mislav Marohnić
8d82a96349
Fix fetching issue/PR comments
The "Author" struct was too overloaded in different types of queries that treat struct fields in incompatible ways. This change defines a simpler CommentAuthor struct for use in comments until we can figure out how to query `... on User` information for comments too.
2022-12-23 17:14:06 +01:00
Sam Coe
e14d14cef2
Add support for issue state reason (#6245) 2022-09-14 12:39:15 +04:00
Sam Coe
e7102f9d84
Migrate to go-gh text package (#6236) 2022-09-14 09:23:55 +04:00
Mark Woods
e876b22963
Change markdown wrap limit match terminal width (#6016) 2022-09-01 07:36:25 +00:00
Sam Coe
6a8deb1f5a
Integrate latest go-gh packages (#6084) 2022-08-18 09:04:13 +03:00
Sam Coe
d244346960
Replace uses of strings.Title (#5623) 2022-05-12 13:52:21 +00:00
Sam Coe
8a0c1f903c
Change issue close color from red to purple (#5436) 2022-04-11 11:50:55 +02:00
Mislav Marohnić
456d55ead9 Have a single Render function handle all Markdown rendering 2022-01-13 19:39:43 +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ć
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
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
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
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
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
Mislav Marohnić
516ea8691e Fix whitespace formatting of issue/pr view help text 2021-04-14 20:04:47 +02:00
Mislav Marohnić
3ad41e3e65 Change JSON Exporter to an interface 2021-04-14 18:15:52 +02:00
Mislav Marohnić
abe452bb19 Add --json export flag for issues and pull requests
The `--json` flag accepts a list of GraphQL fields to query for and
output in JSON format. To get the list of available flags, run the
command with a blank value for `--json`. Additional `--jq` and
`--template` flags are available just like in `gh api`.
2021-04-13 20:29:31 +02:00
Mislav Marohnić
111e8dbcf2 Pass web browser to each individual command
This removes sensitivity to the BROWSER environment variable in tests
and makes it easier to verify the URL that the browser was invoked with
without having to stub sub-processes.
2021-03-19 21:22:37 +01:00
Nate Smith
2ab073d599
Refactor use of glamour to allow style overrides (#3243)
* Refactor use of glamour to allow style overrides

* leave the things the way they were and just expose the ability to set overrides
2021-03-19 16:29:32 +00:00
Mislav Marohnić
d465b7f5d5 Freeze time in issue view test 2021-01-25 13:46:30 +01:00
Sam Coe
b9b1079493
Display reviews when viewing pull requests 2021-01-20 12:15:25 -08:00
Camelid
8ff4cc40e6 view: Add missing newline
Add a newline at the end of the 'View this {issue, pull request} on
GitHub' message. `gh repo view` already had a newline at the end, so
this only changes `issue view` and `pr view`.
2020-12-27 11:37:59 -08:00
Mislav Marohnić
a77f3ddb49
Merge pull request #2575 from cli/pr-view-comments
Add ability to view comments with `pr view`
2020-12-15 16:31:03 +01:00
Sam Coe
dee7077fcf
Extract shared comment and reaction group code 2020-12-09 14:35:29 -05:00
Sam Coe
efc05dee90
Use spinner helper 2020-12-09 13:50:08 -05:00
Sam Coe
9f101ff0a2
Add comments to pr view 2020-12-08 14:18:05 -05:00
Sam Coe
bec5e0cd77
Address PR comments 2020-12-08 10:24:02 -05:00
Sam Coe
bad5a59427
Update non-tty comment output 2020-12-07 14:25:05 -05:00
Sam Coe
8c5e5a3820
Appease the linter 2020-12-07 14:25:05 -05:00
Sam Coe
c843a4fa13
Add issue comment viewing 2020-12-07 14:25:04 -05:00
Cristian Dominguez
fa8674386b
Render links as absolute URLs in repo view (#2363)
Co-authored-by: Cristian Dominguez <cristiand391@users.noreply.github.com>
2020-11-11 13:13:19 +01:00