AutoMerge: Manual merge support app - #720
GunnarFarneback wants to merge 5 commits into
Conversation
… PRs to the General registry.
Codecov Report❌ Patch coverage is
❌ Your project check has failed because the head coverage (40.34%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## master #720 +/- ##
===========================================
- Coverage 78.40% 40.34% -38.06%
===========================================
Files 29 29
Lines 1945 2238 +293
===========================================
- Hits 1525 903 -622
- Misses 420 1335 +915 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ly registered repo names pass.
|
New feature. Running without arguments gives a list of currently open manual PRs, i.e. PRs not created by |
36e3dd9 to
21e821c
Compare
|
This can now analyze the following kinds of manual PRs:
It does not yet support new packages and new versions but those probably require some refactoring of existing AutoMerge code, so I think it would be better to try to get this reviewed and merged in its current shape. The diff is big enough as it is. |
21e821c to
a9d9389
Compare
| length(ARGS) > 1 && return fatal("Usage: manualmerge <PR Number>") | ||
|
|
||
| api = GitHub.GitHubWebAPI(URIs.URI("https://api.github.com")) | ||
| auth = GitHub.AnonymousAuth() |
There was a problem hiding this comment.
will we get rate limited? is there a way to pass a token?
There was a problem hiding this comment.
Those things are outside my knowledge. It's not like this will be doing a significant number of API calls, but I have no clue about rate limitations.
There was a problem hiding this comment.
IIRC, the rate limit for unauthenticated API calls is super low. It's something like 60 per hour.
There was a problem hiding this comment.
I believe this requires two API calls per analyzed PR (one pull_request and one pull_request_files) . The continuation in #725 may need more, at least without tighter integration with the guideline checks.
There was a problem hiding this comment.
I think we should at least have a way for users to pass in a token. As far as I can tell, the token would only need read-only access to only public repos, right?
There was a problem hiding this comment.
What would be the typical way to pass in a token? A --token command line argument, an environment variable, something else?
Yes, all that's needed is to read PR information from General.
There was a problem hiding this comment.
ENV is common, here's what we did in package analyzer: https://github.com/JuliaEcosystem/PackageAnalyzer.jl/blob/9ca90f7ea163db996f80febfa296c3f944cb4d53/src/utilities.jl#L6
There was a problem hiding this comment.
only tangentially related but i've found the gh cli as an easy way to obtain one, fyi: https://cli.github.com/manual/gh_auth_token
Another app (cf. #719), this one intended to help General registry maintainers to analyze manual PRs.
Initially this app only knows how to analyze yank and repository move PRs, e.g.
and
You can install the app before merge with