Commit graph

49 commits

Author SHA1 Message Date
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
Sam Coe
260716a9f8
Repace shurcool/graphql with cli/shurcool-graphql 2021-11-17 12:57:43 -08: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ć
051fbbc1e1 Merge remote-tracking branch 'origin' into dpromanko/remove-set-cmd-prepare 2021-01-28 22:00:08 +01:00
Devon Romanko
2964895a77 fix test behavior changes from migration to run.Stub 2021-01-27 18:46:29 -05:00
Sam Coe
52bdcad8ea
Do not display minimized comments 2021-01-27 08:14:46 -08:00
Devon Romanko
3068d80a27 use Stub instead of SetPrepareCmd in 'issue view' tests 2021-01-26 08:15:43 -05:00
Mislav Marohnić
d465b7f5d5 Freeze time in issue view test 2021-01-25 13:46:30 +01:00
Mislav Marohnić
06cf2c9f81 Merge remote-tracking branch 'origin' into cmd-stub-new 2021-01-22 16:31:29 +01:00
Mislav Marohnić
4158209d50
Merge pull request #2811 from cli/utils-spinner-buh-bye
Retire utils.Spinner in favor of IOStreams.StartProgressIndicator
2021-01-21 17:34:39 +01:00
Sam Coe
b9b1079493
Display reviews when viewing pull requests 2021-01-20 12:15:25 -08:00
Mislav Marohnić
a2bee1fad3 🔥 utils.Spinner 2021-01-20 14:48:14 +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ć
c308f1cd91 Prevent further use of SetPrepareCmd and InitCmdStubber 2021-01-18 22:44:53 +01:00
Cristian Dominguez
ce151420f3 Migrate legacy tests 2021-01-11 21:07:19 -03: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
vilmibm
a2aa154794 port entirely to ColorScheme 2020-10-29 12:37:45 -07:00
Sam Coe
f0d4fbf84f
Address PR comments around style and naming 2020-09-24 19:27:29 +02:00
Sam Coe
ed4075517c
Check for terminal background color before starting pager 2020-09-24 13:06:28 +02:00
Mislav Marohnić
b2e7f0c1e2 Merge remote-tracking branch 'origin' into pager-for-everyone 2020-09-14 14:18:42 +02:00
Mislav Marohnić
9040f6adc6 Fix view tests 2020-09-09 17:40:04 +02:00
Mislav Marohnić
fda9659e4a Consistently print browsed URL across commands 2020-09-09 17:02:02 +02:00
Mislav Marohnić
ccfe38de26 Add PAGER support to commands that produce significant output 2020-09-04 23:36:14 +02:00
Mislav Marohnić
c00fe73d5a Isolate issue commands 2020-08-07 00:27:55 +02:00