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
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
vilmibm
3c892ff268
Merge remote-tracking branch 'origin/master' into issue-create-editor
2019-11-20 12:01:20 -06:00
vilmibm
84d393d543
fix issue create test
2019-11-20 11:57:17 -06:00
vilmibm
88446276e8
use survey when creating issues
2019-11-20 11:54:42 -06:00
vilmibm
633c8c070b
factor out title body prompting
2019-11-20 11:39:42 -06:00
Mislav Marohnić
eff8847513
Improve detecting PR for the current branch
...
Now reads git branch configuration and handles these cases:
branch ["foo"]
remote origin
merge refs/heads/bar
branch ["foo"]
remote other-remote
merge refs/heads/foo
branch ["foo"]
remote https://github.com/OWNER/REPO.git
merge refs/heads/bar
branch ["foo"]
remote origin
merge refs/pull/123/head
2019-11-20 15:20:36 +01:00
Mislav Marohnić
508f6787f0
Have PullRequestForBranch accept "owner:branch" value for forks
...
When on a `patch-1` branch locally, `gh pr view` would happily open the
first open PR it finds with "patch-1" as its head, even those coming
from forks.
2019-11-20 15:20:36 +01:00
Mislav Marohnić
97a6dc494b
Redesign TablePrinter to avoid SetContentWidth / FitColumns steps
...
The API is now:
- AddField;
- EndRow;
- Render.
2019-11-20 13:29:27 +01:00
Mislav Marohnić
02b1f60a24
Merge remote-tracking branch 'origin/master' into table-output
2019-11-20 12:12:09 +01:00
Mislav Marohnić
26c1e4a170
Align checks wording with dotcom
2019-11-20 12:00:24 +01:00
Mislav Marohnić
39f535f0a1
Only show ratio of PR checks when some are failing
...
Now the possible outputs are:
- "checks: pending" (yellow)
- "checks: success" (green)
- "checks: failing" (red) - 1 out of 1 check failed
- "checks: 3/5 failing" (red) - 3 out of 5 checks failed
2019-11-19 12:01:46 +01:00
Mislav Marohnić
f58b7ecb3e
Merge remote-tracking branch 'origin/master' into pr-status-single-check
2019-11-19 11:09:15 +01:00
Amanda Pinsker
5e7557e8fa
Copy edits
2019-11-18 23:26:18 -08:00
Corey Johnson
e5af5be940
Merge remote-tracking branch 'origin/master' into issue-update
2019-11-18 11:09:00 -08:00
Corey Johnson
75a3496bf1
Test flags
2019-11-18 11:05:43 -08:00
Corey Johnson
927b172135
Only add space to status issues
2019-11-15 13:23:05 -08:00
Corey Johnson
e4903fc7c0
Less pointless words
2019-11-15 13:20:13 -08:00
Mislav Marohnić
f30e973b9d
Extract generic row printer that adjusts itself for receiving terminal
...
This makes the approach from `pr list` reusable across other commands
that may benefit from table-based output, e.g. `issue list` or `pr status`
The idea is: instantiate a printer, connect it to stdout, feed it some
data, and it does the rest: colored, truncated column output that fits
into a terminal, or tab-delimited output (no color, no truncation) for
scripts.
2019-11-15 19:19:41 +01:00
Mislav Marohnić
d1eac7b211
pr status: avoid printing a lonely "1" when there is only one Check
...
In a repository that only has a single Check configured (e.g. this
repo), we would print "checks: 1" for PRs where the CI is passing. This
looks akward when repeated for each PR and provides little useful
information.
This avoids ever printing "1" and instead prints "failing", "pending",
or "success", respectively. We now only show numbers for repositories
that have more than one Check runs.
2019-11-15 12:35:44 +01:00
Mislav Marohnić
624c44efda
Merge pull request #63 from github/branch-from-fork
...
Use `OWNER:BRANCH` syntax for cross-repo PRs
2019-11-15 09:28:00 +01:00
Corey Johnson
761d29cf5e
Fix test
2019-11-14 12:40:48 -08:00
Corey Johnson
b4b0c37feb
show labels
2019-11-14 11:30:53 -08:00
Mislav Marohnić
1479ff457a
Merge pull request #38 from github/pr-create
...
Add `pr create` command
Closes #59
2019-11-14 19:33:30 +01:00
Mislav Marohnić
135efda6d3
Avoid re-wrapping of "could not determine suitable remote" error
2019-11-14 19:31:33 +01:00
Mislav Marohnić
0c2d8879d1
Use OWNER:BRANCH syntax for cross-repo PRs
...
This affects `pr status` and `pr list`.
2019-11-14 16:46:59 +01:00
Corey Johnson
57afc2e69f
Add assignee
2019-11-13 13:55:24 -08:00
vilmibm
237fd04ad0
use errors.Wrap
2019-11-13 15:00:57 -06:00