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
Mislav Marohnić
b640a3027a
Merge pull request #80 from github/status-check-rollup
...
Strengthen PR Reviews+Checks GraphQL via `pe_mobile` feature flag
2019-11-18 20:00:25 +01: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ć
be55f81e16
Add "review required" notice to PRs if applicable
2019-11-15 12:05:05 +01:00
Mislav Marohnić
760fac906d
Merge remote-tracking branch 'origin/master' into pr-checkout
2019-11-15 09:31:11 +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
Mislav Marohnić
d8308b4c15
Allow pr checkout while not on any branch
2019-11-14 20:54:44 +01:00
Mislav Marohnić
1fc9c8f9d6
Test the scenario where the target branch already exists
2019-11-14 20:29:24 +01:00
Mislav Marohnić
dc0de147c9
Add pr checkout command
2019-11-14 19:59:42 +01: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ć
0c2d8879d1
Use OWNER:BRANCH syntax for cross-repo PRs
...
This affects `pr status` and `pr list`.
2019-11-14 16:46:59 +01: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ć
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ć
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
nate smith
e3a11c8ffb
fix pr filtering
2019-11-06 18:10:22 +01:00
Mislav Marohnić
667704d574
Add pr list command
...
Old `pr list` is now `pr status`
2019-11-06 17:33:45 +01:00
nate smith
5087ec5c15
restore pr create with new context/client
2019-10-30 12:00:16 -05:00
Mislav Marohnić
f786802e9e
Customizable API client
2019-10-29 21:07:03 +01:00
Mislav Marohnić
8370602f49
WIP eliminate package-level state in commands, context
2019-10-25 21:49:08 +02:00
Corey Johnson
a25fa5d66b
Merge remote-tracking branch 'origin/master' into pr-view-tests
2019-10-17 10:39:49 -07:00
Mislav Marohnić
8016d80884
Create overridable Context interface
2019-10-17 02:25:59 +02:00
Corey Johnson
5a10f2350f
Don't treat no active PR as an error
2019-10-16 16:26:05 -07:00
Corey Johnson
a8b7e4c5f3
Add PRView tests
2019-10-16 14:47:47 -07:00
Corey Johnson
9fe04dc033
Merge remote-tracking branch 'origin/master' into add-pr-show
2019-10-16 12:48:12 -07:00
Corey Johnson
354529b2df
Add some output
2019-10-16 12:39:51 -07:00
Corey Johnson
8ad1afe224
Update command/pr.go
...
Co-Authored-By: Mislav Marohnić <mislav@github.com>
2019-10-16 09:38:33 -07:00
Corey Johnson
f16d95e8cd
small tweaks
2019-10-15 15:31:32 -07:00
Corey Johnson
ef61b49575
A nice error
2019-10-15 15:01:01 -07:00
Corey Johnson
cff76fbc22
Use gookit for colors
2019-10-15 14:51:33 -07:00
Corey Johnson
8d719999a1
Color brackets
2019-10-15 10:53:35 -07:00
Corey Johnson
2df7c2d86f
Make show work
2019-10-14 20:08:57 -07:00
Corey Johnson
1ab5644d6d
Add pr show command
2019-10-14 19:58:34 -07:00
Corey Johnson
b4d28f11b0
Style gh pr list
2019-10-14 14:21:15 -07:00
Corey Johnson
994e9eee10
Use RunE instead of panicking
2019-10-11 14:28:26 -07:00
Corey Johnson
ddb49557d8
Use the correct variable name :)
2019-10-09 15:42:57 -07:00
Corey Johnson
0f6daa0310
Don't panic
2019-10-09 15:32:41 -07:00
Corey Johnson
80dc17778e
Use correct package name
2019-10-09 11:54:37 -07:00