Mislav Marohnić
fcaf912961
Merge branch 'pr-commands-isolate-2' into pr-commands-isolate-3
2020-08-11 15:30:09 +02:00
vilmibm
35f18b6c02
gh auth login
2020-08-06 12:43:35 -05:00
Mislav Marohnić
82661c197e
Isolate pr list command
2020-08-04 18:38:06 +02: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
vilmibm
b7765591b7
remove package level terminal check state
2020-07-17 15:02:05 -05:00
vilmibm
36ade42ba3
scriptability improvements: issue commands
...
This commit is part of work to make gh more scriptable. It includes both
some general purpose helpers towards this goal as well as improvements
to the issue commands. Other commands will follow.
- Adds `utils/terminal.go` for finding out about gh's execution environment
- introduces `stubTerminal` for either faking being attached to a tty or not during tests
- updates issue commands to behave better when not attached to a tty:
- issue list doesn't print fuzzy dates
- issue list doesn't print header
- issue list prints state explicitly
- issue create no longer hangs
- issue create fails with clear error unless both -t and -b are specified
- issue view prints raw issue body
- issue view prints metadata in a consistent, linewise format
2020-07-14 12:30:53 -05:00
Shubhankar Kanchan Gupta
1ddb4d76a7
Strip carriage returns in markdown rendering ( #1351 )
2020-07-10 16:01:15 +02:00
Mislav Marohnić
ac7d5ecc44
Ensure markdown still passed through Glamour in no-color mode
2020-06-22 19:44:16 +02:00
Mislav Marohnić
04b18ea8cb
🔥 unused var
2020-06-22 19:32:06 +02:00
Mislav Marohnić
55be0d2a9c
Tweak isColorEnabled
2020-06-22 19:18:18 +02:00
gabgodBB
e6e8f701a2
Issue #930 - Removing color for output files
2020-06-12 14:26:38 -03:00
gedenata
4c94d126da
variable global color
2020-06-10 14:02:42 +08:00
gedenata
81799caeb6
variable global color
2020-06-10 13:59:28 +08:00
gedenata
417de6257a
variable global color
2020-06-10 13:57:31 +08: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
Mislav Marohnić
250114e2c0
Merge pull request #742 from brettbuddin/no-color
...
Support NO_COLOR environment variable to disable color
2020-04-03 19:10:16 +02:00
Mislav Marohnić
734497a8d8
Code fixes informed by golangci-lint failures ( #738 )
2020-04-03 16:33:34 +02:00
Brett Buddin
0cc41b4912
Provide notty style to glamour when colors are disabled.
2020-04-02 21:09:29 -04:00
Brett Buddin
48e7df2337
Any non-empty value should be a disabling intent.
...
Conforms to the informal standard proposed in https://no-color.org
2020-04-02 20:31:04 -04:00
Brett Buddin
21e445beab
Support NO_COLOR environment variable to disable color.
2020-04-02 20:22:55 -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
Nate Smith
3d7733870e
Merge branch 'master' into repo-fork
2020-03-03 15:40:54 -06:00
vilmibm
1217bfce09
add spinner helper
2020-02-26 11:41:54 -06:00
Dasio
9289ab99f2
Use var syntax when empty struct is initialized
2020-02-24 22:33:22 +01:00
Mislav Marohnić
9c2efd6c1c
Extract reusable IsTerminal()
2020-02-21 12:46:21 +01:00
Mislav Marohnić
4c3e498021
Fix column alignment and truncation for Eastern Asian languages
...
- Ensure that text is never truncated mid-character, which would result
in garbled text
- Ensure that columns in `issue/pr list` output align properly
2020-02-20 18:52:17 +01:00
Nate Smith
c65ac4ae9d
Merge branch 'master' into glamour-markdown
2020-02-18 14:23:49 -06:00
Mislav Marohnić
61ff5d73bd
Fix crash in issue/pr list for narrow terminals
...
If the available column width is smaller than 3, don't try to truncate
with ellipsis (`...`). Instead, just truncate to available width.
2020-02-18 20:03:09 +01: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
a4b97014d1
stray TODO
2020-01-17 16:07:35 -06:00
vilmibm
a297153637
test for utils.FuzzyAgo
2020-01-17 15:57:02 -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ć
a0458956c0
Add docs to color funcs
2019-11-28 11:55:14 +01:00