Mislav Marohnić
21e2544d73
Sort latest PRs first when looking up PRs for a branch
...
Fixes #2452
2020-11-25 12:06:35 +01:00
Josh Soref
e5f59a15fe
spelling: response
2020-11-21 21:43:51 -05:00
Abhilash Gnan
9e03d01bdf
Fetch all issue labels
...
Signed-off-by: Abhilash Gnan <abhilashgnan@gmail.com>
2020-10-28 19:45:21 +01:00
Mislav Marohnić
e093d23521
Merge pull request #2276 from ianbillett/view-closed-prs
...
Allow `gh pr view <closed_pr_branch_name>` to view closed PRs
2020-10-28 17:50:10 +01:00
Mislav Marohnić
fb621d2988
💅 code style
2020-10-28 15:50:59 +01:00
Mislav Marohnić
d09561d03c
💅 simplify sortPullRequestsByState
2020-10-28 15:50:59 +01:00
Mislav Marohnić
2ac68cc534
PullRequestForBranch: fix outdated error message
...
This method doesn't necessarily search through open pull requests.
2020-10-28 15:50:59 +01:00
Ian Billett
0f61272333
Allow PullRequestForBranch to search in closed pull requests
2020-10-28 15:50:59 +01:00
Sam
edecb2e4f7
Merge pull request #2207 from cli/codespaces
...
[Codespaces] Support "integration" tokens
2020-10-27 15:37:02 +03:00
Ishida Yuya
7512d9131f
Get open and closed milestones when milestones are filtered by title ( #2209 )
2020-10-21 18:22:06 +02:00
Sam
becb316308
Merge pull request #2177 from jonathanlloyd/use-canonical-capitalization-in-remotes
...
Clone repos using canonical username/repo name capitalization
2020-10-20 09:23:21 +02:00
Sam
869f5118c6
Merge pull request #2178 from quiye/milestone-int32-validation
...
Add int32 validation to milestone numbers
2020-10-20 09:17:22 +02:00
Mislav Marohnić
53cea2667e
Support "integration" tokens
...
Integration tokens are different than OAuth token in it that they don't report any `X-Oauth-Scopes` in response headers.
2020-10-16 17:11:14 +00:00
Mislav Marohnić
626be2a095
Fix formatting in MissingScopesError
2020-10-16 17:11:10 +00:00
Mislav Marohnić
38f0f607e9
🔥 outdated CheckScopes
2020-10-16 17:10:23 +00:00
Mislav Marohnić
e270cdb29e
Simplify test to avoid use of reflect
2020-10-14 15:54:42 +02:00
Mislav Marohnić
813fbc9b8d
Ensure that we don't reuse the same deserialization struct over pagination iterations
...
This is to avoid subtle deserialization issues in nested slices.
2020-10-14 15:38:21 +02:00
zamasu
a90b62fb6c
Fix parsing labels in paginated IssueList
2020-10-14 15:32:45 +02:00
Jonathan Lloyd
8f44aee76a
Load repo and parent in single query
2020-10-13 20:41:16 +01:00
zamasu
d4e6fc11d7
Add int32 validation to milestone numbers
2020-10-13 08:36:47 +09:00
Pushpamk
581783176a
deleted comment
2020-10-08 20:34:10 +05:30
Pushpamk
f8a49ca624
updated reference comment
2020-10-08 16:04:28 +05:30
Pushpamk
40a0b0d511
updated new github doc. link
2020-10-08 00:55:44 +05:30
Mislav Marohnić
7663acdc29
Improve HTTP caching layer
...
- make thread-safe
- only cache GET, HEAD, and GraphQL requests
- only cache non-5xx, non-403 responses
- include `Accept` and `Authorization` headers in cache key
2020-10-02 15:19:40 +02:00
Mislav Marohnić
f7a82a216b
Avoid error from cache file being prematurely closed
...
I have no idea what's going on there, so I'll just give up the streaming
approach and read the entire contents of the cache file to memory.
https://github.com/cli/cli/pull/2035/checks?check_run_id=1194798056
2020-10-01 22:06:15 +02:00
Mislav Marohnić
1d435a3e2e
Ensure that cache file is closed after reading
2020-10-01 19:18:11 +02:00
Mislav Marohnić
93c8fc1e98
Add tests for GraphQL introspection
2020-10-01 16:33:56 +02:00
Mislav Marohnić
0ef2863ede
Cache GHE responses for schema queries
...
This speeds up `pr`-related commands for GHE by caching schema
introspection queries for 24h.
2020-09-30 19:09:15 +02:00
Mislav Marohnić
ff925fb480
Resolve @me to current username on GHE
...
It looks like GHE v2.20 does not support `@me` in search yet.
2020-09-30 19:05:06 +02:00
Mislav Marohnić
bed9d11f7a
Avoid querying statusCheckRollup or reviewDecision on unsupported GHE
...
We first ask the GHE server for whether it supports these fields.
2020-09-30 19:04:09 +02:00
Mislav Marohnić
7a8db80420
Prompt for push target during pr create
...
We no longer guess the head repository using heuristics; instead, we
present the user with the choice of pushable repositories and an
additional option to create a new fork.
The new `pr create --head` flag is available for the user to specify the
head branch in `branch` or `owner:branch` format and completely skip any
forking or auto-pushing checks.
2020-09-16 14:49:36 +02:00
Mislav Marohnić
f30bc5bc64
Merge pull request #1552 from cli/release-cmd
...
Add commands for managing GitHub Releases
2020-09-09 18:07:19 +02:00
vilmibm
0c16a6b0b5
fix butchered query
2020-09-09 09:50:10 -05:00
Mislav Marohnić
ad0bbde351
Merge remote-tracking branch 'origin' into release-cmd
2020-09-09 15:27:49 +02:00
Nate Smith
74614b13da
Merge pull request #1627 from giacomoalbe/add-commit-headline-to-pr-merge
...
Add PR Title to CommitHeadline during merge PR
2020-09-08 17:05:26 -05:00
Mislav Marohnić
d77a8c2e61
Scope pr merge commit headline to only squash method
2020-09-07 22:27:27 +02:00
Giacomo Alberini
cab0e0f43d
Add pr Title and number to commitHeadline in merge request
2020-09-04 23:07:51 +02:00
vilmibm
eb132a1ae6
Merge remote-tracking branch 'origin/trunk' into checks
2020-09-03 14:48:32 -05:00
vilmibm
2961c655fb
review feedback
2020-09-02 11:33:39 -05:00
Mislav Marohnić
6933c381bf
Restore Go 1.13 compatibility
2020-09-01 19:12:02 +02:00
Nate Smith
734959c39d
Merge pull request #1603 from cli/create-pr-metadata-failure
...
Be transparent about which part of `pr create` flow failed
2020-09-01 10:51:55 -05:00
Mislav Marohnić
766e4950d9
Be transparent about which part of pr create flow failed
...
When applying metadata to the new PR such as assignees or reviewers, if
the operation fails, an error message would get printed:
failed to create pull request: <API error text>
This was misleading, because the PR did get created; it's just that
updating it failed. The new error message is:
https://github.com/OWNER/REPO/pull/123
pull request update failed: <API error text>
The PR URL is printed on stdout and the error message is printed on
stderr. In case of any errors, the exit code is still non-zero.
2020-08-31 16:46:22 +02:00
vilmibm
8dd93e1748
gh pr checks
...
A basic first pass on gh pr checks that shows all check runs for a given
PR's latest commit.
2020-08-28 13:18:59 -05:00
Mislav Marohnić
9a4a5d86cb
Merge remote-tracking branch 'origin' into release-cmd
2020-08-28 17:47:53 +02:00
Mislav Marohnić
d43d5e0bc9
Add release delete
2020-08-28 17:41:00 +02:00
Colin Shum
58f62a4a15
[Feature] Create repository from template
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2020-08-27 14:46:16 -04:00
Mislav Marohnić
cf46ae2db7
Log larger response bodies with DEBUG=api
2020-08-21 18:00:52 +02:00
Mislav Marohnić
33fd6b1149
Change API authentication to allow asset downloads
...
We install an HTTP middleware that adds the "Authorization" header on
every HTTP request. However, our asset download process might redirect
to a 3rd-party host (Amazon S3) and we want to allow those requests but
not require that they are authenticated.
Furthermore, we need the ability to specify the `Accept` request header
without it being overwritten by middleware, so now middleware only adds
headers that are not present in a request.
2020-08-21 18:00:52 +02:00
Mislav Marohnić
a00d927970
Add release download, upload files on create, upload retrying
2020-08-21 18:00:52 +02:00
vilmibm
2753f6fa48
Merge remote-tracking branch 'origin/trunk' into fix-milestone
2020-08-19 12:31:32 -05:00