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>
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.
* Implement first round of support for GitHub Actions
This commit adds:
gh actions
gh run list
gh run view
gh job view
as part of our first round of actions support. These commands are
unlisted and considered in beta.
* review feedback
* tests for exit status on job view
* spinner tracks io itself
* review feedback
* fix PR matching
* enable pager for job log viewing
* add more colorf functions
* add AnnotationSymbol
* hide job, run
* do not add method to api.Client
* remove useless cargo coded copypasta
Sometimes, due to rounding errors, after calculating the width of each
column in a table, the sum of all columns would be shorter that the
total available width in the terminal. This reimplements the elastic
column resizing algorithm to ensure that all available space has been
filled.
As a bonus fix, columns that contain URLs are never truncated.
We used to send the ANSI sequence for "bright black" when we wanted gray, but this color turns out to not be visible in some popular color schemes.
Instead, when we detect a 256-color terminal, switch to displaying a color sequence for gray that is consistent and does not depend on terminal color scheme.
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