Commit graph

38 commits

Author SHA1 Message Date
Mislav Marohnić
030c997301 Avoid long first line of gh help
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.
2019-12-16 15:55:21 +01:00
Corey Johnson
387b9d9544 better name? 2019-12-06 13:33:23 -08:00
Corey Johnson
f1eb29b791 Add colorableErr 2019-12-06 13:32:36 -08:00
Corey Johnson
418da8713b Merge pull request #128 from github/add-feedback
Add google form link to root help description
2019-12-04 10:48:33 -08:00
Mislav Marohnić
87a1490d1e Improvements to update notifier authentication
- 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.
2019-12-04 15:41:08 +01:00
Amanda Pinsker
8369372501 Add google form link to root help description 2019-12-03 08:58:05 -05:00
Corey Johnson
1231ddd01c Add test 2019-12-02 15:08:36 -08:00
Mislav Marohnić
64dcdd68e5 Merge pull request #118 from github/win-ansi-color
Fix ANSI color output on Windows
2019-11-28 11:47:02 +01:00
Mislav Marohnić
ae2e8f057c Merge branch 'master' into flags-language 2019-11-27 23:18:20 +01:00
Mislav Marohnić
b6fa88337d Ensure that commands print to a colorable output
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()`.
2019-11-27 20:51:51 +01:00
Mislav Marohnić
854a4b3fdf 💅 Sentence-case for --help and --version flags 2019-11-27 17:26:27 +01:00
Mislav Marohnić
b8a0754a03 💅 Sentence case for CLI flags 2019-11-27 17:09:40 +01:00
Mislav Marohnić
002aac3519 Remove global -B, --current-branch flag
Now `pr list --base` has shorthand `-B`
2019-11-27 17:05:49 +01:00
Mislav Marohnić
b8251650db Have gh version be an alias for gh --version 2019-11-27 16:42:38 +01:00
Mislav Marohnić
4ec31ffd57 Strip the "v" prefix when displaying gh version string 2019-11-27 16:42:13 +01:00
Amanda Pinsker
977d47b263 Shorten top summary 2019-11-22 11:07:59 -08:00
evelyn masso
b30054c55a use the offish tag line from @ampinsk 2019-11-21 10:20:54 -08:00
evelyn masso
b64db1213f formatting 😅 2019-11-20 15:11:25 -08:00
evelyn masso
11d569f340 expand root help summary 2019-11-20 15:10:14 -08:00
Amanda Pinsker
5e7557e8fa Copy edits 2019-11-18 23:26:18 -08:00
Mislav Marohnić
04f20ddb2b Use statusCheckRollup internal GraphQL to simplify Statuses+Checks
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.
2019-11-15 11:43:00 +01:00
Mislav Marohnić
933086bae9 Merge remote-tracking branch 'origin/master' into pr-create 2019-11-13 19:31:02 +01:00
Mislav Marohnić
a275398dac Merge remote-tracking branch 'origin/master' into pr-create 2019-11-11 12:24:09 +01:00
Mislav Marohnić
7419f7ae64 Add checks, reviews info to pr status 2019-11-08 21:04:47 +01:00
Mislav Marohnić
2939924124 Merge branch 'master' into version-flag 2019-10-31 23:13:07 +01:00
Mislav Marohnić
c3d70bd8cd Clarify where Version and BuildDate are set 2019-10-31 23:10:42 +01:00
Mislav Marohnić
e87775845d Also print cmd usage string on "unknown command" 2019-10-31 22:44:43 +01:00
Mislav Marohnić
a6e61a3a8d Silence Cobra usage on errors
When an error occurs anywhere in a command, Cobra used to print the
error itself and command usage help.

We already print error in `main()`, and we don't want to use command
usage string on anything other than flag-parsing errors.

This also fixes the double output of each error.
2019-10-31 13:47:10 +01:00
Mislav Marohnić
0bf3e7500c Add --version flag support 2019-10-31 12:14:55 +01:00
nate smith
5087ec5c15 restore pr create with new context/client 2019-10-30 12:00:16 -05:00
Mislav Marohnić
f786802e9e Customizable API client 2019-10-29 21:07:03 +01:00
Mislav Marohnić
8370602f49 WIP eliminate package-level state in commands, context 2019-10-25 21:49:08 +02:00
Mislav Marohnić
641de86427 Eliminate package-level state in git remote parsing 2019-10-25 21:48:25 +02:00
Mislav Marohnić
c82e38353f Fix global --repo, --current-branch functionality
Turns out I've tried to use the flags' value too early: they are not yet
parsed out at package `init()` time.
2019-10-18 19:24:16 +02:00
Mislav Marohnić
183db99535 Ensure remote URL parsing tests don't read user SSH config files 2019-10-17 15:58:26 +02:00
Mislav Marohnić
344906bf03 Test SSH config parser 2019-10-17 15:50:17 +02:00
Mislav Marohnić
8016d80884 Create overridable Context interface 2019-10-17 02:25:59 +02:00
nate smith
8dd03144ff initial commit 2019-10-03 22:20:31 -05:00