Commit graph

818 commits

Author SHA1 Message Date
Mislav Marohnić
2089b15e6a Fix pagination when fetching metadata 2020-05-04 17:09:11 +02:00
Corey Johnson
0bb1d2018a Add code to reopen 2020-05-01 12:00:13 -07:00
Corey Johnson
19f6c69854 Actually make it work 2020-04-30 11:27:11 -07:00
Corey Johnson
f9a55f4d8e Add close pull request code 2020-04-30 11:24:43 -07:00
Corey Johnson
e2aab30836
just return the err
Co-authored-by: Nate Smith <vilmibm@github.com>
2020-04-30 08:59:14 -07:00
Corey Johnson
23c072b39d Add api call 2020-04-29 14:14:50 -07:00
Corey Johnson
28b35aa333
Merge pull request #843 from cli/when-god-closes-an-issue-he-opens-a-pull-request
Add `gh issue close <urlOrNumber>`
2020-04-29 11:54:48 -07:00
Toshiya Doi
d2d0b47ecc Merge branch 'master' into reviewers-in-pr-view 2020-04-30 00:31:04 +09:00
Corey Johnson
660cce7790 Take a URL 2020-04-28 12:15:33 -07:00
Corey Johnson
f22f584e8d Handle closed issues 2020-04-28 11:53:25 -07:00
Corey Johnson
bf94a31619 not on issues disabled
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-04-28 10:05:56 -07:00
Corey Johnson
a2f0cc6de7 Issue close works
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-04-28 09:31:19 -07:00
Corey Johnson
ad48d8b3c3 Add issue close
Co-Authored-By: Nate Smith <vilmibm@neongrid.space>
2020-04-28 09:13:08 -07:00
Daniel Foad
09157f1fc7
unit tests 2020-04-28 00:03:21 +01:00
Mislav Marohnić
c6d8a4c151 Fix mutations 2020-04-27 16:42:53 +02:00
Mislav Marohnić
42baf4c8c5 Support org projects and team reviewers 2020-04-27 14:09:05 +02:00
Mislav Marohnić
3aaa231cc5 Guide user through re-authorization flow if read:org scope is missing
How this works for people with existing OAuth tokens:

    $ gh issue list -L1
    Notice: additional authorization required
    Press Enter to open github.com in your browser...
    [auth flow in the browser...]
    Authentication complete. Press Enter to continue...

    Showing 1 of 132 issues in cli/cli
    ...

Users of Personal Access Tokens get a different notice:

    Warning: gh now requires the `read:org` OAuth scope.
    Visit https://github.com/settings/tokens and edit your token to enable `read:org`
    or generate a new token and paste it via `gh config set -h github.com oauth_token MYTOKEN`
2020-04-23 18:20:21 +02:00
Mislav Marohnić
6ed50c66ea Prefetch metadata in parallel 2020-04-22 19:15:44 +02:00
Toshiya Doi
1ce09ff758 Merge branch 'master' into reviewers-in-pr-view 2020-04-22 22:00:02 +09:00
Toshiya Doi
d70358ea34 Support GitHub Team in requested reviewers 2020-04-22 21:58:01 +09:00
Mislav Marohnić
a7d061709d Add ability to prefetch granulated repository metadata 2020-04-21 19:14:57 +02:00
Mislav Marohnić
39c4a5bc1b Remove unnecessary nil check 2020-04-17 20:29:18 +02:00
Mislav Marohnić
d3a89b8744 Expand issue create metadata flags to pr create
- Includes support `pr create --reviewer <login>`
- Hide "Preview in browser" menu option when any metadata are set
2020-04-17 20:23:57 +02:00
Mislav Marohnić
de59f6a1bf Add flags to add additional metadata to issue create
- `-a, --assignee` (accepts multiple)
- `-l, --label` (accepts multiple)
- `-p, --project` (accepts multiple)
- `-m, --milestone`
2020-04-15 18:28:52 +02:00
Mislav Marohnić
3d566dc5a6 Detect and warn about read:org OAuth scope being missing 2020-04-15 17:25:15 +02:00
gertd
203525c031 pr bug/rest-204 review feedback 2020-04-10 16:48:11 -07:00
gertd
b9f1b5dac1 fix api.REST(DELETE, ...) json.Unmarshal failure 2020-04-09 22:19:28 -07:00
Nate Smith
c670049ce7
Merge pull request #745 from doi-t/add-metadata-to-view
Add relevant metadata to issue view in CLI
2020-04-09 16:27:07 -05:00
Toshiya Doi
2df5281f2f Merge branch 'master' into reviewers-in-pr-view 2020-04-10 04:46:05 +09:00
Toshiya Doi
6223a2c198 Puts completed reviews before review requests and sort reviewer names alphabetically 2020-04-10 01:16:43 +09:00
Toshiya Doi
6d0e5bf2b8 Remove Participants related codes for pr view` 2020-04-10 01:02:51 +09:00
Toshiya Doi
054ec3c635 Remove Participants related codes 2020-04-10 00:56:45 +09:00
Toshiya Doi
d07617817d Query first 100 issue metadata by PR number and branch (3 --> 100) 2020-04-08 14:53:55 +09:00
Toshiya Doi
24fcc69f9e Query first 100 issue metadata by issue number (3 --> 100) 2020-04-08 14:47:46 +09:00
Toshiya Doi
8fca78f584 Query first 100 requestedReviewer and last 100 reviews 2020-04-06 17:56:51 +09:00
Toshiya Doi
a4fcb634c2 Fix requestedReviewer struct 2020-04-06 17:53:41 +09:00
Toshiya Doi
92dea433e4 An attempt of collecting reviewers metadata 2020-04-04 13:28:47 +09:00
Toshiya Doi
d538f7a1be Query pr metadata by number and branch 2020-04-04 13:08:22 +09:00
Toshiya Doi
125ff06b2c Add metadata to PullRequest struct 2020-04-04 13:07:44 +09:00
Toshiya Doi
1279131f0f Simplify issue struct avoiding to sue edges 2020-04-04 11:28:52 +09:00
Toshiya Doi
6dbf821198 Query issue metadata by number 2020-04-04 11:28:52 +09:00
Toshiya Doi
013481c0d6 Add metadata to issue struct 2020-04-04 11:28:52 +09:00
Mislav Marohnić
e10ccefaf5
Merge pull request #667 from doi-t/view-the-current-state
Show the state (open, closed, merged) in issue view and pr view
2020-04-03 19:41:29 +02:00
Mislav Marohnić
734497a8d8
Code fixes informed by golangci-lint failures (#738) 2020-04-03 16:33:34 +02:00
Toshiya Doi
0095fe9a13 Merge branch 'master' into view-the-current-state 2020-04-02 23:52:41 +09:00
Mislav Marohnić
f0e6c98bf0 Fix auto-forking scenario in pr create
When an existing `headRepo` couldn't be detected, it's time to auto-fork
one. Unfortunately, an obscure Go behavior made it seem like `headRepo`
was a non-nil value, where in fact it did contain a nil pointer which
would crash the process.

This avoids ever assigning nil pointers to `var headRepo ghrepo.Interface`.
2020-04-01 19:37:56 +02:00
Mislav Marohnić
0e9b48d876
Merge pull request #719 from cli/upstream-remote
Automatically set up "upstream" remote for forks
2020-03-31 17:10:50 +02:00
Mislav Marohnić
8460609181 repo clone: automatically set up "upstream" remote for forks 2020-03-31 15:32:52 +02:00
Mislav Marohnić
219e3ecc5b Stop querying base branch commit hash from API
This code was put in place in preparation for a feature that never
shipped. Namely, we wanted to use the commit hash for the base branch so
we can get an accurate `git log` involving the changes in a pull
request. However, getting the commit hash from API is not the way to go
because the latest commit might not be available in the person's local
repository, and using a local tracking branch for base such as
`origin/master` works quite well in most cases without dereferencing it.
2020-03-31 13:36:48 +02:00
Mislav Marohnić
da2116f8ee Merge remote-tracking branch 'origin/master' into pr-create-push-default 2020-03-30 13:32:37 +02:00