Commit graph

405 commits

Author SHA1 Message Date
Björn Heinrichs
c9f79271b1
Add --maintainer-edit flag (#2250)
* Add --maintainer-edit flag

Closes #2213 while retaining backwards compatibility.

* Fix linting

* Adjust documentation and validation

* Negate logic and fix build errors

* rename to no-maintainer-edit

* test

* use a positive option instead of negative

Co-authored-by: vilmibm <vilmibm@github.com>
2021-01-20 14:51:27 -08:00
Sam Coe
b9b1079493
Display reviews when viewing pull requests 2021-01-20 12:15:25 -08:00
Mislav Marohnić
75ebb863e3 Use testify assertions for error matching 2021-01-19 13:59:37 +01:00
Cristian Dominguez
45f4a1f087 Equal: flip arguments position 2021-01-18 21:00:59 -03:00
Cristian Dominguez
3afb1d0b1a Use Testify assertions in test 2021-01-16 19:19:30 -03:00
Sam
b0ae09e627
Merge pull request #2535 from cli/create-comments
Create issue comments
2021-01-12 11:24:09 -08:00
Cristian Dominguez
ce151420f3 Migrate legacy tests 2021-01-11 21:07:19 -03:00
Sam Coe
723e9e31ba
Address PR comments 2021-01-11 13:56:17 -08:00
Sam Coe
de73b16178
Move CreateComment mutation 2021-01-05 10:39:07 -08:00
Sam Coe
1fc8b66b26
Address PR comments 2021-01-05 10:36:03 -08:00
Sam Coe
f862123071
Modify issue commenting to adhere to designs and add tests 2021-01-05 10:35:09 -08:00
Yuki Osaki
8ef2bb4d14
Comment on issues from editor 2021-01-05 10:35:09 -08:00
Mislav Marohnić
65e5ba9da1
Merge pull request #2493 from gunadhya/repo-clone-wiki
Initial fix for gh-repo-clone wiki
2020-12-15 18:01:55 +01:00
gunadhya
fd57835bb9 Fix repo clone wiki 2020-12-15 17:45:03 +01:00
Sam Coe
9f101ff0a2
Add comments to pr view 2020-12-08 14:18:05 -05:00
Sam Coe
bec5e0cd77
Address PR comments 2020-12-08 10:24:02 -05:00
Sam Coe
8c5e5a3820
Appease the linter 2020-12-07 14:25:05 -05:00
Sam Coe
c843a4fa13
Add issue comment viewing 2020-12-07 14:25:04 -05:00
Mislav Marohnić
f4152454f2
Merge pull request #2472 from cristiand391/preserve-metadata-state
Prompt: avoid resetting PR/issue metadata
2020-12-03 18:51:29 +01:00
Mislav Marohnić
d6add864b8 Ensure efficient resolving of issue/pr create metadata to GraphQL IDs
For metadata types chosen in interactive flow, we fetch all records from
the API in order to be able to display a multi-select interface.

For metadata defined via command-line flags, we resolve records that can
be looked up directly, avoiding fetching the entirety of expensive
datasets (e.g. all members of an organization) if we can.

The new approach ensures efficient fetching when interactive flow is
combined with values from flags.
2020-12-03 15:53:13 +01:00
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