Commit graph

163 commits

Author SHA1 Message Date
Corey Johnson
eb414bf2a1 Add a little test 2019-12-06 14:33:04 -08:00
Corey Johnson
f70473c234 Replace excessive whitespace 2019-12-06 14:32:55 -08:00
Corey Johnson
bbb91d6a2a Replace newlines 2019-12-05 14:12:12 -08:00
Mislav Marohnić
5c4a94e13a Merge pull request #132 from github/pr-create--web
Add `gh pr create --web` to open a PR using web flow
2019-12-04 22:31:57 +01:00
Mislav Marohnić
551f365bfc Merge pull request #129 from github/pr-arg-selector
Support issue/PR URLs & PR branch names passed as arguments
2019-12-04 22:03:07 +01: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
Corey Johnson
b6adf7f4b1 Merge branch 'master' into upgrade-gh-reminder 2019-12-04 09:55:23 -08:00
Mislav Marohnić
fb8a7e26e6 Reset bool flags so they don't leak between tests 2019-12-04 16:47:11 +01:00
Mislav Marohnić
5ac4b1e6d6 Implement pr create --web 2019-12-04 16:26:40 +01:00
Mislav Marohnić
5d644d2468 Silence stderr in git push during pr create but show it on failures 2019-12-04 16:16:10 +01: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ć
4e859fa7ca Validate PR passed as pr view <url> before opening it 2019-12-03 21:45:28 +01:00
Mislav Marohnić
b223176b37 Accept issue URL in issue view <issue>
Also validates that the issue passed either by number or by URL exists.
2019-12-03 21:41:22 +01:00
Mislav Marohnić
29de133ccf Accept PR URL or branch argument in pr checkout <pr> 2019-12-03 21:19:09 +01:00
Mislav Marohnić
519e731038 Allow specifying PR URL or branch name for pr view <pr> 2019-12-03 20:52:36 +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
1231ddd01c Add test 2019-12-02 15:08:36 -08: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
Mislav Marohnić
db8c2d4e01 Merge remote-tracking branch 'origin/master' into pr-current-branch 2019-12-02 18:56:11 +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ć
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ć
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
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ć
6179570873 Replace "Recent issues" with "Issues opened by you" 2019-11-27 16:56:53 +01:00
Mislav Marohnić
bfdef59377 💅 consistent sub-command initialization style 2019-11-27 16:49:24 +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
Mislav Marohnić
d99698f048 Fix minor code issues discovered by staticcheck
`honnef.co/go/tools/cmd/staticcheck`
2019-11-26 16:18:20 +01:00
Nate Smith
89700216c6 Merge pull request #97 from github/issue-create-editor
Use survey when creating issues
2019-11-25 11:34:11 -06:00
vilmibm
619c42fc87 use iota 2019-11-25 11:33:59 -06:00
Mislav Marohnić
cdf40cc6ed Merge pull request #98 from github/more-specific-help-summaries
More specific help summaries
2019-11-25 11:34:19 +01:00
Amanda Pinsker
977d47b263 Shorten top summary 2019-11-22 11:07:59 -08:00
Mislav Marohnić
fdcf028cce Align issue list output with that of pr list 2019-11-22 17:15:11 +01:00
Mislav Marohnić
a650cbe002 Simplify parsing API issues 2019-11-22 17:04:32 +01:00
evelyn masso
b30054c55a use the offish tag line from @ampinsk 2019-11-21 10:20:54 -08:00
Mislav Marohnić
eabcae84c7 Merge pull request #81 from github/pr-status-single-check
`pr status`: avoid printing a lonely "1" when there is only one Check
2019-11-21 15:27:53 +01: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
evelyn masso
98062b7c0e slightly more specific command summaries 2019-11-20 11:38:27 -08:00