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ć
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ć
0c2d8879d1
Use OWNER:BRANCH syntax for cross-repo PRs
...
This affects `pr status` and `pr list`.
2019-11-14 16:46:59 +01:00
Mislav Marohnić
933086bae9
Merge remote-tracking branch 'origin/master' into pr-create
2019-11-13 19:31:02 +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ć
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ć
5fcda2b5b5
Merge remote-tracking branch 'origin/master' into pr-list
2019-11-06 19:45:10 +01:00
Mislav Marohnić
401aef283f
Prototype issue create
2019-11-06 19:10:15 +01:00
Mislav Marohnić
5d2ecf12ca
Fix issues order
2019-11-06 19:10:15 +01:00
Corey Johnson
d658a8f407
Add Issue query
2019-11-06 19:05:23 +01:00
Mislav Marohnić
9133ad9f87
pr list: indicate state by color, useful for -s all
2019-11-06 18:48:41 +01:00
Mislav Marohnić
667704d574
Add pr list command
...
Old `pr list` is now `pr status`
2019-11-06 17:33:45 +01:00
Mislav Marohnić
875352a03c
Fix issues order
2019-11-01 14:36:26 +01:00
Corey Johnson
357de1b183
Add Issue query
2019-10-30 16:26:33 -07:00
nate smith
5087ec5c15
restore pr create with new context/client
2019-10-30 12:00:16 -05:00
Mislav Marohnić
862db45587
Add mising files
2019-10-29 21:19:34 +01:00
Mislav Marohnić
f786802e9e
Customizable API client
2019-10-29 21:07:03 +01:00
Mislav Marohnić
8016d80884
Create overridable Context interface
2019-10-17 02:25:59 +02:00
Mislav Marohnić
12e295e46b
Merge remote-tracking branch 'origin/master' into ghr-context
2019-10-17 02:23:00 +02:00
Corey Johnson
bb2876cf37
Merge branch 'master' into test
2019-10-15 14:21:34 -07:00
Corey Johnson
59ddb5607d
Use func var to override GraphQL calls
2019-10-15 14:19:56 -07:00
nate smith
0600c8c68c
switch to context struct
2019-10-15 13:36:38 -05:00
Corey Johnson
893b2a63f6
Remove logging
2019-10-14 11:09:31 -07:00
Corey Johnson
ef1a8a80f1
Tests use temp git repo
2019-10-14 10:18:27 -07:00
Corey Johnson
90b0a6c55a
use spaces
2019-10-11 14:43:04 -07:00
Corey Johnson
ed4f59fe30
rename v to data
2019-10-11 14:37:28 -07:00
Corey Johnson
2dc521d589
A non-successful response returns early
2019-10-11 14:23:46 -07:00
Corey Johnson
9cb1230857
Trying to test the gh pr list
2019-10-10 16:36:36 -07:00
nate smith
09d58b923d
add GitHubRepository
2019-10-10 16:02:23 -05:00
nate smith
6e6b18c50a
move more stuff into context.go
2019-10-10 15:43:25 -05:00
nate smith
df074046ac
add context.go and move over getToken
2019-10-10 15:39:39 -05:00
Corey Johnson
0f6daa0310
Don't panic
2019-10-09 15:32:41 -07:00
Corey Johnson
3a931ea83e
spacing
2019-10-09 13:15:08 -07:00
Corey Johnson
a35441cb69
Add version
2019-10-09 13:15:03 -07:00
Corey Johnson
b7dda5ef25
tweaks
2019-10-09 11:39:26 -07:00
Corey Johnson
8b69ca3919
Rename package to api
2019-10-09 11:34:35 -07:00