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
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
Billy Griffin
e262e7283c
Swap "open in browser" to "view in browser" for view cmd
2019-11-13 13:59:32 -07:00
Mislav Marohnić
933086bae9
Merge remote-tracking branch 'origin/master' into pr-create
2019-11-13 19:31:02 +01:00
Mislav Marohnić
bb87f4a2fb
Add pr create test for git clean state
2019-11-13 19:25:02 +01:00
Mislav Marohnić
e3e8647760
Eliminate package-level flags
2019-11-13 19:24:58 +01:00
Corey Johnson
44c7495bab
Add state
2019-11-12 14:31:24 -08:00
Mislav Marohnić
6aa0c071d6
Simplify tests that use StubExecCommand
2019-11-11 17:04:26 +01:00
Mislav Marohnić
65054fdc6e
Complete pr create test
2019-11-11 15:01:41 +01:00
Mislav Marohnić
ef4cadd8c9
Pass arbitrary params to CreatePullRequest
2019-11-11 14:09:24 +01:00
Mislav Marohnić
a275398dac
Merge remote-tracking branch 'origin/master' into pr-create
2019-11-11 12:24:09 +01:00
Mislav Marohnić
8fea48146d
Shorter representation of successful checks in pr status
2019-11-08 22:04:18 +01:00
Mislav Marohnić
f70accd3e0
pr status prints PR number in yellow
...
This matches `pr list`
2019-11-08 22:03:47 +01:00
Mislav Marohnić
e1f52fed01
Display checks, reviews on a new line to prevent terminal wrap
2019-11-08 21:04:47 +01:00
Mislav Marohnić
7419f7ae64
Add checks, reviews info to pr status
2019-11-08 21:04:47 +01:00
Mislav Marohnić
25142d4895
Add issue create test
2019-11-08 15:20:24 +01:00
Mislav Marohnić
10c248d691
Merge remote-tracking branch 'origin/master' into issue-status-view
2019-11-07 18:46:18 +01:00
Mislav Marohnić
b2c06caf51
Merge remote-tracking branch 'origin/master' into pr-list
2019-11-06 19:47:05 +01:00
Mislav Marohnić
5fcda2b5b5
Merge remote-tracking branch 'origin/master' into pr-list
2019-11-06 19:45:10 +01:00
Mislav Marohnić
524fe0a69b
🔥 last instance of mockOpenInBrowser
2019-11-06 19:41:18 +01:00
Mislav Marohnić
32e36d2fe0
Merge branch 'master' into exec-cmd-error-info
2019-11-06 19:36:12 +01:00
Mislav Marohnić
cdd495160c
Merge pull request #39 from github/completion
...
Add `completion` script
2019-11-06 19:31:29 +01:00
Mislav Marohnić
401aef283f
Prototype issue create
2019-11-06 19:10:15 +01:00
Mislav Marohnić
40131abfba
issue list → issue status to bring in line with pr prototype
2019-11-06 19:10:15 +01:00
Corey Johnson
da334e283b
Merge pull request #43 from github/gh-issue
...
Add `gh issue list` and `gh issue view`
2019-11-06 10:09:11 -08:00
Corey Johnson
3782ed6c8d
Tweaks
2019-11-06 10:07:24 -08:00
Corey Johnson
aea7ae8efd
Add gh issue list and gh issue view ISSUE_NUMBER
2019-11-06 19:05:23 +01:00
Corey Johnson
738562436f
Update tests
2019-11-06 10:02:35 -08:00
Corey Johnson
b50898f05b
move to init
2019-11-06 10:01:16 -08:00
Mislav Marohnić
e6d55fff1c
Calculate instead of hardcode the width of the PR number column
2019-11-06 18:53:58 +01:00
Mislav Marohnić
9133ad9f87
pr list: indicate state by color, useful for -s all
2019-11-06 18:48:41 +01:00