Rearrange the long help text so that '--config' does not appear at the
start of a line which groff interprets as an undefined macro and skips
the content of that whole line.
To reproduce:
$ go run cmd/gen-docs/main.go --man-page --doc-path /tmp/gh-manpages
$ man --warnings -E UTF-8 -l -Tutf8 -Z /tmp/gh-manpages/gh-codespace-ssh.1 >/dev/null
troff: <standard input>:26: warning: macro '--config'' not defined
Discovered by the Debian Lintian tool.
The function enableVirtualTerminalProcessing must return an error if
virtual terminal processing (only applicable on Windows) was not
enabled, otherwise we assume that the terminal supports both 256-color
and truecolor.
We have been erroneously assuming that all non-Windows terminals are
256-color and sending escape sequences to those that cannot intepret
them. This led to some parts of Survey prompts being invisible on old
terminals.
Regressed in be4b392530
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.
Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
The API field `WorkflowRun.name` is not guaranteed to correspond to the workflow name anymore. This introduces additional API lookups that resolve Workflows by their ID and look up their name in a future-proof fashion.
It also adds two new JSON fields for export: `displayTitle` and `workflowName`.
Co-authored-by: Christina Guo <61271066+guo-chris@users.noreply.github.com>
Co-authored-by: Mislav Marohnić <mislav@github.com>
Use `HOSTNAME/gist/ID` instead of `gist.HOSTNAME/ID` as clone URL for
Enterprise since it's not guaranteed that the `gist.` subdomain is
configured for a GHE instance.
On non-Windows platforms, this avoids wrapping `IOStreams.Out` in a
`fdWriter` and thus causing subprocesses to lose connection to the
terminal that gh is connected to.