Commit graph

258 commits

Author SHA1 Message Date
Mislav Marohnić
704a9e88a5 Merge pull request #104 from github/issue-list-table
Align `issue list` output with that of `pr list`
2019-11-25 11:22:43 +01:00
Corey Johnson
267262c882 Merge pull request #92 from github/git-describe
Fix injecting git version information into development build
2019-11-22 14:17:02 -08:00
Mislav Marohnić
3680ccb59d Merge pull request #91 from github/issue-template
Issue templates for CLI
2019-11-22 17:31:34 +01: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
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ć
adfc014298 Merge pull request #82 from github/table-output
Extract generic row printer that adjusts itself for receiving terminal
2019-11-21 14:15:36 +01:00
Tiernan L
08687f70e0 spelling 2019-11-20 14:33:16 -10:00
Tiernan L
4f7fbe29b4 shortened template 2019-11-20 14:31:55 -10:00
Tiernan L
2a0771c171 minor updates 2019-11-20 14:27:53 -10: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ć
2022f8e74b Avoid widening table columns that already fit 2019-11-20 12:30:24 +01:00
Mislav Marohnić
9fc80a1f8a Fix crash with empty table 2019-11-20 12:18:50 +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ć
c7a38b6331 Merge branch 'checks-crash' 2019-11-20 11:26:16 +01:00
Mislav Marohnić
8e89c0479e Merge pull request #95 from github/rename-file
Rename PR query file
2019-11-20 10:17:00 +01:00
Amanda Pinsker
4340b643f6 Merge pull request #94 from github/help-copy-edits
Help copy edits
2019-11-19 15:16:18 -08:00
Corey Johnson
89db5cbee6 Move to queries_pr 2019-11-19 14:59:17 -08:00
Corey Johnson
1051ea420d Merge pull request #90 from github/lables-on-issue-status
Add labels to `gh issue status`
2019-11-19 14:58:15 -08:00
Corey Johnson
c1ad55ba64 use const 2019-11-19 14:57:52 -08: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
Mislav Marohnić
7c731bc512 Avoid crash when parsing in-progress CheckRuns
Fixes `panic: unsupported status: ""`

This occurs when a CheckRun has status "IN_PROGRESS" (or any other than
"COMPLETED") and when its `conclusion` would be null. I previously
didn't account for this.

This adds support for parsing state of an in-progress CheckRun.
2019-11-19 09:42:59 +01:00
Mislav Marohnić
4a5ed81577 Fix injecting version information into build from git
This was a typo. Note that Makefile is only used for building a
development version after cloning from git; the tagged release process
uses `.goreleaser.yml` and skips the Makefile.
2019-11-19 09:01:18 +01:00
Amanda Pinsker
5e7557e8fa Copy edits 2019-11-18 23:26:18 -08:00
Tiernan L
30f36d6dd0 Create problem-to-rasie.md 2019-11-18 14:33:05 -10:00
Tiernan L
d372467f5d Create bug_report.md 2019-11-18 14:31:00 -10:00
Corey Johnson
20b47871a0 Add labels to the issues status 2019-11-18 14:56:15 -08:00
Corey Johnson
7bb2c38467 Merge pull request #65 from github/issue-update
Make `gh issue list` match the design spec
2019-11-18 11:17:15 -08:00
Corey Johnson
9aea93e5b2 Merge remote-tracking branch 'origin/master' into issue-update 2019-11-18 11:13:26 -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
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
Corey Johnson
e8020077ae Remove debut statement 2019-11-18 10:34:25 -08:00
Nate Smith
dc4820a27f Merge pull request #87 from github/issue-status-open
Include open issues only in `issue status`
2019-11-18 12:13:27 -06:00
Corey Johnson
223651629a Merge pull request #57 from github/add-release-notes
Add release instructions to readme
2019-11-18 10:12:05 -08:00
Nate Smith
06e491a190 Merge pull request #64 from github/pr-checkout
Add `pr checkout` command
2019-11-18 12:10:19 -06:00
Mislav Marohnić
e7fed2e39c Include open issues only in issue status 2019-11-18 17:12:43 +01:00
Corey Johnson
a9ce81b139 bye bye 2019-11-15 13:26:27 -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
Corey Johnson
3e062589c5 Update README.md 2019-11-15 13:16:19 -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ć
be55f81e16 Add "review required" notice to PRs if applicable 2019-11-15 12:05:05 +01:00
Mislav Marohnić
6e894a0eab Use reviewDecision internal GraphQL to simplify review state
Before, we've used the `reviews` connection to iterate through all
reviews chronologically and try to guess the final state of reviews.
This approach had several problems:
- it didn't handle dismissed reviews well,
- the conclusion would likely be wrong if the number of total reviews
  exceeded the per-page limit.

The `pe_mobile` feature flag exposes the `reviewDecision` field that
handles all of this for us.
2019-11-15 12:00:13 +01:00
Mislav Marohnić
04f20ddb2b Use statusCheckRollup internal GraphQL to simplify Statuses+Checks
With the old approach, we had to enumerate all StatusContexts and
CheckRuns to calculate whether a PR has passing or failing CI status.

Using `statusCheckRollup` which is behind the `pe_mobile` feature flag,
this is somewhat simpler because both StatusContexts and CheckRuns are
now behind the same connection.

Additionally, should we decide to *not* show the number of
passing/failing checks, this now approach allows us to consume the
`statusCheckRollup { state }` field and avoid paginated collections
and calculating the "winning" state altogether.
2019-11-15 11:43:00 +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