Given the GraphQL query:
issues(filterBy: {assignee: $assignee})
It turns out that passing a query variable `"assignee": null` is NOT
equivalent to omitting the variable altogether:
- `"assignee": null` seems to filter out issues that HAVE an assignee;
- omitting `assignee` correctly returns all issues.
We use green to signify "open" state of issues & PRs in `list` commands
(as opposed to red for "closed" and purple for "merged" state), so let's
be consistent in `status` commands too, where all displayed items are
guaranteed to be open.
If multiple templates are found, the user is prompted to select one.
The templates are searched for, in order of preference:
- issues:
1. `.github/ISSUE_TEMPLATE/*.md`
2. `.github/ISSUE_TEMPLATE.md`
3. `ISSUE_TEMPLATE/*.md`
4. `ISSUE_TEMPLATE.md`
5. `docs/ISSUE_TEMPLATE/*.md`
6. `docs/ISSUE_TEMPLATE.md`
- pull requests:
1. `.github/PULL_REQUEST_TEMPLATE/*.md`
2. `.github/PULL_REQUEST_TEMPLATE.md`
3. `PULL_REQUEST_TEMPLATE/*.md`
4. `PULL_REQUEST_TEMPLATE.md`
5. `docs/PULL_REQUEST_TEMPLATE/*.md`
6. `docs/PULL_REQUEST_TEMPLATE.md`
The filename matches are case-insensitive.
This splits help text over paragraphs and lines to make the output of
`gh` easier to read. It takes care not to go over 80 characters in width
and wraps the URL in `<...>` which will help the URL get auto-linked
when these docs are converted to man and HTML formats.
This stubs stderr separately from stdout in command tests (before those
streams were combined) and improves test assertions around output.
Additionally, no longer use the `cmd.Print*()` family of Cobra functions
because their name sounds like the text will go to stdout, but they
write to stderr instead. Use the more explicit `cmd.ErrOrStderr()` as
output destination instead.