Commit graph

282 commits

Author SHA1 Message Date
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
vilmibm
aaebdfc46f working with gross colorize hack + no pager 2020-05-18 16:49:51 -05:00
Corey Johnson
922b6e06e0 Can be marked ready for review 2020-05-18 12:42:16 -07:00
Corey Johnson
fad9f24f39 Make reopen work 2020-05-18 11:11:13 -07:00
Kevin Bluer
d440a95aed
Improved error message when "owner/repo" format not provided (#919)
Fixes #882
2020-05-18 11:13:48 +02:00
vilmibm
96ba1eacef undo initial thing 2020-05-15 16:44:51 -05:00
vilmibm
7decae71fc untested first pass on ensureScopes 2020-05-15 16:40:13 -05:00
vilmibm
cc1ffb0aea pass apiClient to determineBaseRepo
Our code had an unspoken assumption that only one apiClient is created
during the course of a command. Violating this assumption is fine in
almost all cases, but not when we need to do a re-auth to add a new
oauth scope to a user's token.

There is likely a more elegant solution to the problem but until then
this changes determineBaseRepo to use an existing apiClient.
2020-05-13 14:55:49 -05:00
vilmibm
3a7f56456e tweak reauth code and request a new scope 2020-05-13 14:24:29 -05:00
vilmibm
ed1a3a60fd Merge remote-tracking branch 'origin/master' into wingkwong/master 2020-05-13 13:43:09 -05:00
Mislav Marohnić
57e60ab8a1 Merge remote-tracking branch 'origin/master' into issue-metadata-resolve-ids 2020-05-13 17:20:37 +02:00
Mislav Marohnić
c225d379a9 Preserve CODEOWNERS reviewers in pr create
When reviewers were requested on a PR, they would apparently
overwrite the current set of reviewers. A fresh PR will already have
reviewers if it was assigned some by CODEOWNERS rules.

The fix is to only ever add additional reviewers and not overwrite the
entire set.
2020-05-13 12:09:59 +02:00
Corey Johnson
ad3a5903b2
Merge pull request #873 from cli/the-merge-dubai
Add support for `gh pr merge`
2020-05-12 10:18:54 -07:00
Corey Johnson
9187efdc92 Merge remote-tracking branch 'origin/master' into merge-interactive-merge 2020-05-12 08:53:09 -07:00
Mislav Marohnić
386a53c34a Fix metadata resolver query 2020-05-12 16:48:30 +02:00
Mislav Marohnić
3abc2be0f7 Switch issue create to optimized resolver and update tests 2020-05-12 16:17:06 +02:00
Mislav Marohnić
6d57f2a91e Faster resolve GraphQL node IDs for assignees, reviewers, and labels 2020-05-12 15:33:51 +02:00
Nate Smith
c7f7bfc328
Merge pull request #787 from cli/issue-pr-create-metadata
Add flags to add additional metadata to `issue/pr create`
2020-05-08 15:04:15 -05:00
Nate Smith
5ba3baa3c8
Merge pull request #762 from doi-t/reviewers-in-pr-view
Add Reviewers to pr view in CLI
2020-05-08 14:46:08 -05:00
Nate Smith
77ed118022
Merge pull request #880 from cli/pr-status-crash
Fix `pr status -R` crash with closed PR on the default branch
2020-05-08 14:23:51 -05:00
Corey Johnson
43e15130f1 Use a var 2020-05-08 11:37:45 -07:00
Mislav Marohnić
1128439cd1 issue/pr create: hide "Add metadata" if viewer does not have triage permission 2020-05-08 18:37:08 +02:00
Mislav Marohnić
d7e6d21766 Order projects, teams, and labels by name 2020-05-08 18:22:14 +02:00