Mislav Marohnić
c8cf54c10c
Merge pull request #1258 from cli/ghe-remotes
...
Parse and respect non-github.com git remotes
2020-07-15 13:07:30 +02:00
Mislav Marohnić
28cd348176
Only check OAuth scopes when X-Oauth-Scopes header is present
2020-07-13 15:53:53 +02:00
Mislav Marohnić
55d31303ea
Have admin:org scope satisfy read:org requirement
...
`admin:org` is inclusive of `read:org`, so if we find the former listed
in response headers, we can conclude that the token has necessary scopes
instead of letting a warning notice be shown.
2020-07-13 15:35:14 +02:00
Mislav Marohnić
87a9dc8d4b
Merge remote-tracking branch 'origin' into ghe-remotes
2020-07-13 13:39:14 +02:00
Mislav Marohnić
7a289861d2
Name more queries in test stubs
2020-07-10 20:20:33 +02:00
Mislav Marohnić
13b9c98b2b
Match named queries in test stubs
2020-07-10 20:04:54 +02:00
Mislav Marohnić
d96e88c223
Rename IssueCreate mutation
...
This follows the "NounVerb" convention we got going on
2020-07-10 18:08:16 +02:00
Mislav Marohnić
f4c4ce0b0a
Add names to GraphQL queries made over shurcooL adapter
2020-07-07 17:53:40 +02:00
Mislav Marohnić
a7806a3e78
Add names to queries made over our homegrown GraphQL adapter
2020-07-07 17:53:40 +02:00
Mislav Marohnić
a68cefadd9
Merge remote-tracking branch 'origin' into ghe-remotes
2020-07-02 20:37:33 +02:00
Mislav Marohnić
446a4111f7
Respect hostnames when resolving git remotes and URL args to repos
2020-07-02 20:36:10 +02:00
Mislav Marohnić
ed781103c7
Merge pull request #644 from eddumelendez/add_filters_issues
...
Add filters issues
2020-07-02 12:24:30 +02:00
Mislav Marohnić
1ca3d171e6
Tweak HTTP 422 handling when deleting branches
2020-06-30 19:21:39 +02:00
Mislav Marohnić
6ac61e90b7
Merge remote-tracking branch 'origin' into add_filters_issues
2020-06-30 14:24:30 +02:00
Pavel Borzenkov
3afec6f90a
api: gracefully handle already deleted remote refs
...
If a GitHub repo is configured to automatically delete branches after PR
is merged, `gh pr merge` fails with error like:
failed to delete remote branch: ... (422): 'Reference does not exist'
Gracefully handle such case and don't report the error.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2020-06-27 19:10:42 +03:00
Pavel Borzenkov
c66eebc6fb
api: return structured error for failed API calls
...
`fmt.Errorf` hides information and makes it hard to test for specific
conditions in returned error. Return a structured error instead.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2020-06-27 18:47:34 +03:00
Mislav Marohnić
3ea71e6eb6
Add ability to parse non-GitHub.com git remotes
2020-06-23 19:51:26 +02:00
Mislav Marohnić
e084a4563f
Fix pr checkout OWNER:BRANCH when maintainer can modify
...
We did not use to request the necessary GraphQL fields to determine
whether the PR in question can be modified by maintainers (i.e. pushed
back to).
2020-06-22 19:36:55 +02:00
Eddú Meléndez
cffd56f717
Rename to mention
2020-06-15 16:08:10 -05:00
Eddú Meléndez
a16405650f
Define query variables
2020-06-13 20:55:55 -05:00
Eddú Meléndez
9aebb66a3c
Add milestone filter
2020-06-13 20:53:41 -05:00
Eddú Meléndez
2943703d4a
Add mentioned flag
2020-06-13 20:53:03 -05:00
Mislav Marohnić
b099bb3037
api command: accept full URLs as path input
...
This is to allow file uploads to `https://uploads.github.com `
2020-06-10 16:26:23 +02:00
Corey Johnson
ee2b38df68
Merge pull request #1020 from cli/pr-lookup-v2
...
Consistent PR lookup interface
2020-06-04 10:42:55 -07:00
Corey Johnson
4c75c8bccc
Reset base branch when URL is used
2020-06-03 14:34:13 -07:00
Mislav Marohnić
1595d3b950
Handle HTTP errors in HasScopes
2020-06-02 13:24:46 +02:00
Mislav Marohnić
d026d6af2d
Use githubv4.MarkPullRequestReadyForReviewInput
...
This is available now that we've bumped githubv4
2020-05-28 15:38:46 +02:00
Corey Johnson
a7e8d6fba8
Make PullRequestDiff take a pr
2020-05-27 10:10:21 -07:00
Corey Johnson
4b03cb112c
Update test stubs
2020-05-27 09:21:02 -07:00
Mislav Marohnić
2e93a065b1
Merge remote-tracking branch 'origin/master' into api-command
2020-05-27 12:56:06 +02:00
Mislav Marohnić
ab0e43c6c8
Merge remote-tracking branch 'origin/master' into auth-from-env
2020-05-27 11:44:19 +02:00
Corey Johnson
8d1f2745a4
wip
2020-05-26 16:35:35 -07:00
Corey Johnson
3122696140
Merge pull request #982 from cli/remote-delete
...
Remote delete
2020-05-26 09:10:12 -07:00
Corey Johnson
be5fc07928
Merge pull request #899 from cli/merge-interactive-merge
...
Interactive merge
2020-05-26 08:33:47 -07:00
Corey Johnson
909e177a74
remove mergeable from queries that don't need it
2020-05-26 08:20:43 -07:00
Corey Johnson
9c48e2da14
Delete the branch
2020-05-22 15:25:25 -07:00
Corey Johnson
9c88cd67ee
Whoops
2020-05-22 15:21:51 -07:00
Corey Johnson
9113092f5c
Delete via api
2020-05-22 15:19:39 -07:00
vilmibm
5f28751555
just use a map + stdin test
2020-05-20 17:44:09 -05:00
vilmibm
509be34af6
Merge remote-tracking branch 'origin/master' into wingkwong/master
2020-05-20 17:08:31 -05:00
vilmibm
466edf8d0e
take files as args. handle -
2020-05-20 16:27:28 -05:00
Corey Johnson
46a1e3cd53
Remove convertRepoInterfaceToRepository
2020-05-20 11:19:31 -07:00
Corey Johnson
c3c3058b96
Merge remote-tracking branch 'origin/master' into merge-interactive-merge
2020-05-20 08:30:17 -07:00
Mislav Marohnić
767521c055
Stop providing AuthLogin from context
...
The login name of the authenticated user will be readily available only
if authentication info comes from the config file. With other upcoming
authentication modes (for example, the GITHUB_TOKEN environment
variable), the token is the only piece of information we got, so we
would need to additionally query for the login name.
Since `issue status` and `pr status` are the only commands that need the
name of the authenticated user right now, have those commands explicitly
query for the login name. This results in an additional API query, but
simplifies Context implementation and future authentication approaches.
2020-05-20 17:09:13 +02:00
Mislav Marohnić
90fa193eaf
Promote api command to a pkg/cmd/api package
2020-05-20 15:21:31 +02:00
Mislav Marohnić
fa3e25bb4d
Serialize GraphQL parameters under variables
2020-05-20 15:21:31 +02:00
Mislav Marohnić
1609afe993
Add api command
2020-05-20 15:21:31 +02:00
Nate Smith
45dec1b3e0
Merge pull request #962 from cli/pr-diff
...
pr diff
2020-05-19 14:11:36 -05:00
Corey Johnson
6666adbdce
Deal with merge conflicts
2020-05-19 11:29:00 -07:00
vilmibm
c98b0924dc
properly handle REST errors
2020-05-19 11:58:49 -05:00