Commit graph

363 commits

Author SHA1 Message Date
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
Corey Johnson
07993058e6 Update go.mod 2019-12-04 10:47:44 -08:00
Corey Johnson
51a65c64c3 Merge pull request #99 from github/upgrade-gh-reminder
Add alert text for users to update gh
2019-12-04 10:11:50 -08:00
Corey Johnson
b6adf7f4b1 Merge branch 'master' into upgrade-gh-reminder 2019-12-04 09:55:23 -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
Mislav Marohnić
aaad263a3e Update output of upgrade available notice
- Individual components are now colored
- We don't say "Release notes" anymore since the URL doesn't contain
  any release notes yet
2019-12-04 15:14:48 +01:00
Mislav Marohnić
ba0a441e23 Allow configuring the update notifier from the outside
To test the update notifier:

    rm -f bin/gh; GH_VERSION=v0.2.3 LDFLAGS='-X main.updaterEnabled=github/homebrew-gh' make
2019-12-04 15:07:10 +01:00
Mislav Marohnić
67f0cf3ce3 Improvements to update notifier
- Only report an update available if the version number of the release
  is greater than the current version

- Removes `command` dependency from `update` package; instead, pass
  current version as an argument

- Remove `brew upgrade` instructions since we can't be certain that gh
  was installed via Homebrew in the first place.

- Does not check for updates unless stderr is a tty

- Preserve stderr color output even if stdout is not a tty

- Fixes stderr color output on Windows
2019-12-04 14:47:27 +01:00
Corey Johnson
fb7ea2c6a6 Don't use env vars! 2019-12-03 12:16:29 -08:00
Mislav Marohnić
5bfcab8ba1 Merge pull request #124 from github/pr-list-assignee
Support `-a, --assignee` in `pr list`
2019-12-03 20:06:35 +01:00
Mislav Marohnić
f87680e804 Explain multiple code paths 2019-12-03 19:52:45 +01:00
Mislav Marohnić
db7874add5 go fmt 2019-12-03 17:26:34 +01:00
Mislav Marohnić
2621bccc44 Use RunCommand in tests to ensure flags reset between runs 2019-12-03 17:26:28 +01:00
Mislav Marohnić
723cd06b8a Add pr list --assignee test 2019-12-03 16:01:03 +01:00
Mislav Marohnić
6aa1efcf9f Support --base and --label in combination with pr list --assignee 2019-12-03 16:00:11 +01:00
Amanda Pinsker
8369372501 Add google form link to root help description 2019-12-03 08:58:05 -05:00
Mislav Marohnić
51d570e141 Merge remote-tracking branch 'origin/master' into pr-list-assignee 2019-12-03 11:41:50 +01:00
Corey Johnson
f8f0aa829e Only run in prod 2019-12-02 15:57:34 -08:00
Corey Johnson
dc91781214 Works with POST 2019-12-02 15:46:57 -08:00
Corey Johnson
427a76d728 Use the same words 2019-12-02 15:11:19 -08:00
Corey Johnson
2c86c1d139 Remove line 2019-12-02 15:09:37 -08:00
Corey Johnson
1231ddd01c Add test 2019-12-02 15:08:36 -08:00
Mislav Marohnić
ad120874b9 Merge pull request #96 from github/pr-current-branch
Improve detecting PR for the current branch
2019-12-02 20:46:20 +01:00
Mislav Marohnić
3e06cfff0d Improve mapping current branch to a PR in pr status 2019-12-02 20:40:14 +01:00
Mislav Marohnić
3b4c9a5309 Extract finding selector for PR belonging to current branch 2019-12-02 20:21:28 +01:00
Corey Johnson
de98dbd378 Make the "check update" interface a little cleaner 2019-12-02 10:28:00 -08:00
Corey Johnson
78a9599e2a Used in color 2019-12-02 10:02:30 -08:00
Corey Johnson
5ce2b7ea18 Merge remote-tracking branch 'origin/master' into upgrade-gh-reminder 2019-12-02 10:01:04 -08:00
Mislav Marohnić
db8c2d4e01 Merge remote-tracking branch 'origin/master' into pr-current-branch 2019-12-02 18:56:11 +01:00
Mislav Marohnić
9a3b032ffa Merge pull request #126 from github/cygwin-color
Fix color output to Git Bash
2019-11-28 11:59:51 +01:00
Mislav Marohnić
a0458956c0 Add docs to color funcs 2019-11-28 11:55:14 +01:00
Mislav Marohnić
e636e3e613 Merge remote-tracking branch 'origin/master' into cygwin-color 2019-11-28 11:52:45 +01:00
Mislav Marohnić
15b76ce703 Merge pull request #125 from github/ansi-colorfunc
Make use of ansi.ColorFunc
2019-11-28 11:49:49 +01:00
Mislav Marohnić
ebb7f39985 Merge remote-tracking branch 'origin/master' into ansi-colorfunc 2019-11-28 11:48:54 +01: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ć
8955d3e70e Merge pull request #123 from github/flags-language
Tweak flags language
2019-11-27 23:53:45 +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ć
4148cf76b9 Merge remote-tracking branch 'origin' into win-ansi-color 2019-11-27 20:08:00 +01:00
Mislav Marohnić
24b04b5fca Make use of ansi.ColorFunc
Speed up repeated calls to color functions by using ansi.ColorFunc to
create a closure per each color.

https://godoc.org/github.com/mgutz/ansi#ColorFunc
2019-11-27 19:16:53 +01:00
Mislav Marohnić
004ab1e9db Fix color output to Git Bash 2019-11-27 18:58:23 +01:00
Mislav Marohnić
aeb060e012 Allow pr list filtering of assignee + state 2019-11-27 18:25:01 +01:00
Mislav Marohnić
1bf28927f0 Support -a, --assignee in pr list
This is for symmetry with `issue list`.

The problem is that the `Repository.pullRequests` connection doesn't
support filtering by assignee, therefore we need to switch to search API
in case an assignee was specified. This is awkward, but I don't see
another way.
2019-11-27 18:15:07 +01:00
Nate Smith
07df89f931 Merge pull request #122 from github/issue-status-mine
Replace "Recent issues" with "Issues opened by you"
2019-11-27 11:08:15 -06:00
Nate Smith
caf8eea0c7 Merge pull request #121 from github/cli-version
Have `gh version` be an alias for `gh --version`
2019-11-27 11:06:58 -06:00
Nate Smith
0a6a2991d5 Merge pull request #119 from github/term-cygwin
Fix detecting terminal under Git Bash on Windows
2019-11-27 11:06:39 -06:00
Nate Smith
49cc3ca1dc Merge pull request #120 from github/oauth-win
Fix OAuth flow on Windows
2019-11-27 11:06:19 -06:00
Nate Smith
21f43f3003 Merge pull request #114 from github/linux-instruction-tweak
linux instruction tweaks
2019-11-27 10:48:37 -06:00
Nate Smith
6777b4f16c Update README.md 2019-11-27 10:47:35 -06:00
Nate Smith
478d5de9a1 Update README.md 2019-11-27 10:45:05 -06:00