The "path" field of a GraphQL error object contains a mix of strings and
numbers and cannot be deserialized into `[]string`. Fortunately, we
don't need to rely on the "path" field and instead have the final error
message be constructed by aggregating human-readable "message" fields.
The "nospace" directive instructs the shell completion logic to avoid
adding a space after completing the word. However, this feature was
broken in an older Cobra, and users still saw a space character added.
In most case we want the space because we anticipate that the user might
want to add extra arguments to the command.
This status describes a state where the head branch is mergeable and
technically not blocked per base branch requirements, but it does have
non-passing checks.
Conditions prohibiting a regular merge: BLOCKED, BEHIND, DIRTY.
Conditions triggering a regular merge even if `--auto` was set: CLEAN,
HAS_HOOKS.
Note that UNKNOWN status does not trigger either of the conditions.
This removes the false equivalence between GH_CONFIG_DIR and
XDG_CONFIG_HOME. These settings do not have the same effect and should
not be used for the same purposes.
Also remove the documentation about what `XDG_*` settings do. We simply
conform to the XDG Base Directory Specification, but will not document
it. It's likely that users of these environment variables already know
what they do.
Before:
$ GH_ENTERPRISE_TOKEN="..." gh pr create
could not find hosts config: not found
Now:
$ GH_ENTERPRISE_TOKEN="..." gh pr create
set the GH_HOST environment variable to specify which GitHub host to use
Also amends `gh help environment` documentation to suggest the use of
GH_HOST when scripting operations with GitHub Enterprise repositories.
The first paragraph uses single quotes when referring to shell arguments
and variables, but the rest of the docs use double quotes. This commit
switches to using single quotes throughout the docs.
I prefer to use single quotes inside string literals because Go uses
double quotes to define a string literal.
On non-Unix-like shells like Windows Command Prompt, single quotes are
handled differently. You need to define aliases using double quotes
instead of single quotes.
I added an inline example to illustrate the quotes. The example is
formatted as inline code blocks in Markdown. Unfortunately, because Go
uses backticks for raw string literals, I needed to do some rather ugly
string concatenation in order to get the backticks included in the doc
string.
This also rearranges the notes so that the platform specific notes are
at the end of the documentation.
This enforces strict separation between serialization structs used for
repository creation payload with respect to whether GraphQL or REST was
used. Before, a field added to a GraphQL payload would leak to REST
payload (and vice versa).
we don't ever check the return of Fprintf anywhere else in the codebase
so doing it here suggests that it's a special case. if it's something we
should be doing we can circle back and do it more consistently.