It's sufficient to return a value of type `ghrepo.Interface` instead of
a pointer to an interface. This avoids having to use `*` whenever we are
passing the result of `determineBaseRepo()` into another function that
accepts a `ghrepo.Interface`.
Since the Go toolchain is able to extract the module version at build
time, we should use that as a default instead of DEV. This means
customers installing via go-get will get the correct version.
Unfortunately, the toolchain does not store when the build occurs, so
BuildTime now defaults to the empty string. It is still set if build
officially, just not for go-get.
For `net.DNSError`, the full error message can be scary. Instead, print "error
connecting to HOST" and hint that the user should check their internet connection
or githubstatus.com.
When $DEBUG is set, the full DNS error is printed like before.
Fixes#206
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.
- Check for updates even if `~/.config/gh` does not exist. In this case,
the API call is unauthenticated.
- Avoid having the update notifier ever triggering the OAuth flow.
If a command does `fmt.Print(...)` for output that contains ANSI color
codes, this not safe on Windows. We have to ensure that we always use
the `fmt.Fprint*` family of functions with a writer that was transformed
using `utils.NewColorable()`.
With the old approach, we had to enumerate all StatusContexts and
CheckRuns to calculate whether a PR has passing or failing CI status.
Using `statusCheckRollup` which is behind the `pe_mobile` feature flag,
this is somewhat simpler because both StatusContexts and CheckRuns are
now behind the same connection.
Additionally, should we decide to *not* show the number of
passing/failing checks, this now approach allows us to consume the
`statusCheckRollup { state }` field and avoid paginated collections
and calculating the "winning" state altogether.