Uh oh!
There was an error while loading. Please reload this page.
Add support for locally hosted GHES instances to reduce rate limiting - #720
Add support for locally hosted GHES instances to reduce rate limiting#720C1ARKGABLE wants to merge 4 commits into
Conversation
C1ARKGABLE
commented
Aug 23, 2023
Guidance + suggestions are welcome! |
bhundven
commented
Sep 29, 2023
@e-korolevskii@dmitry-shibanov This also affects a GHE instance I use. |
| } | ||
| exports.findAllVersions = findAllVersions; | ||
| function getManifestFromRepo(owner, repo, auth, branch = 'master') { | ||
| function getManifestFromRepo(owner, repo, auth, branch = 'master', serverUrl = 'https://api.github.com') { |
There was a problem hiding this comment.
getManifestFromRepo() is a function from a library imported at the top of src/install-python.ts. The code here in dist/* is generated from that library at compile time, so your changes will be overwritten.
For reference, here is the source of the library function. If you truly intend to reuse the library function you'll first need to merge a PR changing its signature here.
In order for this PR to work you need to limit your changes to the src/*.ts files.
| const MANIFEST_REPO_BRANCH = 'main'; | ||
| export const MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/${MANIFEST_REPO_BRANCH}/versions-manifest.json`; | ||
| const API_URL = core.getInput('github_api_url'); | ||
| const GITHUB_API_URL = API_URL ? 'https://api.github.com' : API_URL; |
There was a problem hiding this comment.
truthy and falsey expressions are backwards here, should be API_URL ? API_URL : ...
| const API_URL = core.getInput('github_api_url'); | ||
| const GITHUB_API_URL = API_URL ? 'https://api.github.com' : API_URL; | ||
| const RAW_URL = core.getInput('github_raw_url'); | ||
| const GITHUB_RAW_URL = RAW_URL ? 'https://raw.githubusercontent.com' : RAW_URL; |
There was a problem hiding this comment.
truthy and falsey expressions are backwards here, should be RAW_URL ? RAW_URL : ...
jhaxon
commented
Oct 10, 2023
Without any changes to |
C1ARKGABLE
commented
Oct 10, 2023
Converted to a draft until I can work on this further |
priyagupta108
commented
Feb 4, 2026
@C1ARKGABLE, |
priya-kinthali
commented
Jul 21, 2026
Hello @C1ARKGABLE 👋, As we didn't hear back on whether there's a remaining gap this PR would still cover, and given that the underlying problem is now resolved on main, we're going to close this PR. Thanks again for your contribution! |
Description:
Rate limiting, while necessary, can be frustrating to deal with. The work around is not always a viable solution. No company wants to rely solely on a single employee's GitHub.com PAT for significant internal projects.
This attempts to resolve rate limiting errors by allowing users to internally host a copy of
actions/python-versionsand specify their GHES api endpoint instead of the GitHub.com endpoint being hardcoded.##[error]API rate limit exceeded for YOUR_IP. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)Related issue:
#683
#638
#666
#316
#443 (comment)
https://docs.github.com/en/enterprise-server/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access
Check list: