Nate Smith
55a5d19252
Merge pull request #247 from github/issue-pr-view-docs
...
Tweak `issue/pr view` documentation
2020-01-23 09:35:38 -06:00
Mislav Marohnić
f58dd04074
Avoid saying "number as argument" for issue/pr view
...
Since issue URLs, PR URLs, and PR branch names are all accepted as arguments,
avoid explicitly requesting "number" as argument.
2020-01-23 13:09:37 +01:00
Mislav Marohnić
f5ad43458c
Avoid using <...> in docs
...
When converted to HTML docs, these get interpreted as HTML tags.
In theory, we could encapsulate these bits in backticks, but the docs are
already in raw Go string literals, and we can't easily escape backticks in that
context. Instead, just avoid using `<>` for now.
2020-01-23 10:28:29 +01:00
Mislav Marohnić
305410cdee
Fix usage synopsis for pr view
...
Indicate that the argument is optional
2020-01-23 10:28:26 +01:00
Tiernan L
96edddc874
PR to pull request
2020-01-14 12:33:48 -10:00
Tiernan L
cf44dcd81b
removed terminal mention
2020-01-14 11:27:40 -10:00
Tiernan L
2026b8ae0d
use long-form reference
2020-01-14 10:34:57 -10:00
vilmibm
5bc6d220c4
review feedback
2020-01-13 15:32:07 -06:00
vilmibm
bbdf30c8f8
add tests for pr/issue previewing in terminal
2020-01-10 15:40:09 -06:00
vilmibm
4925c3cf01
preview PRs and issues in the terminal with -p
2020-01-10 11:41:26 -06:00
Corey Johnson
c9bcf807b1
Make it work with PRs
2020-01-08 12:31:23 -08:00
Corey Johnson
4fcf13dac4
Make it work with PRs
2020-01-08 11:44:27 -08:00
Corey Johnson
8f74b658b2
Merge remote-tracking branch 'origin/master' into appropriate-context-and-feedback
2019-12-20 11:51:37 -08:00
Corey Johnson
b66c34e0ec
Output to stderr
2019-12-20 11:16:27 -08:00
Mislav Marohnić
3346e7b8dc
Print pr status numbers in green
...
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.
2019-12-19 17:50:44 +01:00
Mislav Marohnić
7b7c985e79
Merge remote-tracking branch 'origin/master' into appropriate-context-and-feedback
2019-12-17 13:00:10 +01:00
Corey Johnson
6d0f4e7a90
Add more text
2019-12-16 11:41:56 -08:00
Mislav Marohnić
48aeff1ca7
Assert stdout separarely from stderr in command tests
...
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.
2019-12-16 15:46:42 +01:00
Corey Johnson
9b5f7a8148
Use new error.As method
2019-12-12 11:09:50 -08:00
Corey Johnson
92642f4d53
Create NotFoundError
2019-12-11 10:58:59 -08:00
Corey Johnson
2218e60264
Label as pull request
2019-12-11 10:24:58 -08:00
Corey Johnson
573dda22a1
Simplify flag setting
2019-12-11 10:19:18 -08:00
Corey Johnson
9b40efcad5
Add better gh pr view message
2019-12-10 16:03:10 -08:00
Corey Johnson
5296f72189
Better messaging for gh pr checkout
2019-12-10 16:03:05 -08:00
Corey Johnson
5949ca4b56
Merge pull request #142 from github/empty-pr-list
...
Add empty state for `gh pr list`
2019-12-10 12:04:41 -08:00
Corey Johnson
4de0a76234
Merge pull request #141 from github/add-url-branch-to-usage
...
Add better usage docs for `gh pr view` `gh pr checkout` `gh issue view`
2019-12-06 14:39:43 -08:00
Corey Johnson
f70473c234
Replace excessive whitespace
2019-12-06 14:32:55 -08:00
Corey Johnson
00b38bb11c
Add better message to empty gh issue list
2019-12-06 14:10:01 -08:00
Corey Johnson
9aa3f35f8a
Better language in the "no pr" state
2019-12-06 13:33:57 -08:00
Mislav Marohnić
5f90cdc801
Elaborate on what is accepted as issue/PR arguments
2019-12-06 18:01:36 +01:00
Mislav Marohnić
4b8921f011
Consistently use {} to denote mutually exclusive options
2019-12-06 18:01:14 +01:00
Mislav Marohnić
8222e7d74f
Consistently use <> to denote placeholders
2019-12-06 17:59:36 +01:00
Corey Johnson
bbb91d6a2a
Replace newlines
2019-12-05 14:12:12 -08:00
Corey Johnson
fee303699a
Show message when there are no PRs
2019-12-05 12:01:05 -08:00
Corey Johnson
cce2fd4a22
Add better usage docs
2019-12-05 11:40:36 -08:00
Mislav Marohnić
4e859fa7ca
Validate PR passed as pr view <url> before opening it
2019-12-03 21:45:28 +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ć
2621bccc44
Use RunCommand in tests to ensure flags reset between runs
2019-12-03 17:26:28 +01:00
Mislav Marohnić
6aa1efcf9f
Support --base and --label in combination with pr list --assignee
2019-12-03 16:00:11 +01:00
Mislav Marohnić
51d570e141
Merge remote-tracking branch 'origin/master' into pr-list-assignee
2019-12-03 11:41:50 +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
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ć
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
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ć
cdf40cc6ed
Merge pull request #98 from github/more-specific-help-summaries
...
More specific help summaries
2019-11-25 11:34:19 +01:00