Commit graph

45 commits

Author SHA1 Message Date
Sam Coe
e7102f9d84
Migrate to go-gh text package (#6236) 2022-09-14 09:23:55 +04:00
Jeff Hubbard
b8ecbe748f go fmt 2022-03-29 13:50:31 -07:00
Jeff Hubbard
ef0672eac0
Merge branch 'trunk' into multi-devcontainer 2022-03-29 13:46:05 -07:00
lylecantcode
56fda0f8c6
Support GH_DEBUG to control verbosity, deprecate DEBUG (#5306)
The GH_DEBUG environment variable is a new gh-specific verbosity control.

For backwards-compatibility, DEBUG will still be respected if it has values
"1", "true", "yes", and "api", but any other values will be ignored.

Finally, support for "oauth" debug value has been dropped in favor of "api".
The "oauth" value only had limited, internal use.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-03-29 18:05:35 +02:00
Jeff Hubbard
9554e522af Change the way we parse list-devcontainers response 2022-03-28 14:24:57 -07:00
Cristian Dominguez
fb39c38c85 Disable preview option in prompts if URL size is too long 2021-03-30 19:12: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
Mislav Marohnić
a2bee1fad3 🔥 utils.Spinner 2021-01-20 14:48:14 +01:00
Sam Coe
c843a4fa13
Add issue comment viewing 2020-12-07 14:25:04 -05:00
vilmibm
a2aa154794 port entirely to ColorScheme 2020-10-29 12:37:45 -07:00
Dimitris Apostolou
6f550b5d12
Fix typos 2020-10-04 22:16:30 +03:00
Sam Coe
ed4075517c
Check for terminal background color before starting pager 2020-09-24 13:06:28 +02:00
zacanger
f17d9672f5
fix(browser): show message if $BROWSER isn't in $PATH (#1749) 2020-09-23 12:17:54 +02:00
vilmibm
8dd93e1748 gh pr checks
A basic first pass on gh pr checks that shows all check runs for a given
PR's latest commit.
2020-08-28 13:18:59 -05:00
vilmibm
35f18b6c02 gh auth login 2020-08-06 12:43:35 -05:00
Shubhankar Kanchan Gupta
bb6851c88b
Add "open" qualifier when listing open issues/PRs (#1457) 2020-07-31 18:22:08 +02:00
Jesse Millar
90f04d4864 Enable custom color themes with the GLAMOUR_STYLE environment variable 2020-07-28 15:23:48 +02:00
vilmibm
086fb48d31 move displayURL 2020-07-23 11:25:31 -05:00
vilmibm
70c948a751 move isURL 2020-07-23 11:23:45 -05:00
Mislav Marohnić
cbcc778d20 Adapt markdown rendering for light terminal backgrounds
Bonus: disallows trying to first read `notty` and `dark` style files from disk
2020-07-21 13:16:42 +02:00
Shubhankar Kanchan Gupta
1ddb4d76a7
Strip carriage returns in markdown rendering (#1351) 2020-07-10 16:01:15 +02:00
vilmibm
15a6225f05 totally inelegant approach to hopefully stopping flakey tests 2020-04-29 14:17:16 -05:00
Mislav Marohnić
aa183d7408 Set spinner writer stream in a preferred way 2020-04-13 14:09:56 +02:00
Brett Buddin
0cc41b4912
Provide notty style to glamour when colors are disabled. 2020-04-02 21:09:29 -04:00
vilmibm
f4b8851011 Merge remote-tracking branch 'origin/master' into pr-status-no-commits 2020-03-25 12:00:58 -05:00
vilmibm
5187ad4431 move preparecmd and Runnable to its own package 2020-03-23 16:32:29 -05:00
Mislav Marohnić
488b47bded Enable tests to capture spinner output
Explicitly assign the writer stream for the progress spinner so that
tests may override it.

The default when not in testing stays the same: the output stream is the
colorable stdout.
2020-03-20 18:18:27 +01:00
vilmibm
0344e9543a humanize branch name for title 2020-03-17 16:18:32 -05:00
Christian Muehlhaeuser
0d6e347155
Bump glamour dependency
This indirectly also updates the chroma syntax highlighting package,
which fixes a rendering bug for CRLF line endings, which we
encountered in cli. We can therefore remove our internal work-around.
2020-03-04 15:03:04 +01:00
vilmibm
1217bfce09 add spinner helper 2020-02-26 11:41:54 -06:00
Nicolas Martin
950144945f Use glamour as markdown rendering backend for issue & pr previews
glamour uses the CommonMark compliant Goldmark markdown parser instead of
go-termd which is based on Blackfriday.
2020-02-06 00:20:16 +01:00
Mislav Marohnić
fe7cdd8ab7 Extract web browser launching to a package
This fixes opening URLs with `&` on Windows.
2020-01-29 11:49:38 +01:00
vilmibm
d7d575fccb support more time units 2020-01-21 14:25:38 -06:00
vilmibm
bfdf89b579 updated based sorting and fuzzy time display on issue status 2020-01-17 15:38:41 -06:00
vilmibm
daf02ff3ec de-inline go-termd 2020-01-13 16:10:22 -06:00
vilmibm
4592aaf63d clarify newline normalization 2020-01-13 15:36:43 -06:00
vilmibm
5bc6d220c4 review feedback 2020-01-13 15:32:07 -06:00
vilmibm
bc1ab20cdf turns out this has frightening state 2020-01-10 15:40:09 -06:00
vilmibm
e42b097629 inline a markdown rendering lib
This commit inlines https://github.com/tj/go-termd for a few reasons:

- off the shelf it relies on a broken, erroneously released version of
blackfriday (a markdown parser)
- based on discussion with ampinsk, there are some tweaks we'd like to
make to markdown rendering beyond what the library exposes now
- it's a small library (around 300 sloc)

This commit only:

- messes with go.mod to fix the blackfriday issues
- adds an inclusion note
- renames the package
2020-01-10 14:44:51 -06:00
vilmibm
4925c3cf01 preview PRs and issues in the terminal with -p 2020-01-10 11:41:26 -06:00
Mislav Marohnić
7f4833d84e 🔥 unused code 2019-11-26 14:14:31 +01:00
Mislav Marohnić
f6fcdf114e Use SetPrepareCmd hook to spy on OpenInBrowser
We are now able to assert that the browse command was called with the correct URL
2019-11-01 22:18:12 +01:00
Corey Johnson
a8b7e4c5f3 Add PRView tests 2019-10-16 14:47:47 -07:00
Mislav Marohnić
adf5a832fe Rename to "github/gh-cli" 2019-10-04 10:50:12 +02:00
nate smith
8dd03144ff initial commit 2019-10-03 22:20:31 -05:00