tool-cache.getManifestFromRepo() has hard coded URL and does not support GHES repo
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the enhancement
I tried to improve setup-python that user can provide versions-manifest.json ( https://github.com/actions/setup-python/pull/717 )
And after apply above change, and I tried to use above modification at Github Enterprise Server.
But I found that current implementation of tool-cache has hardcoded URL (https://api.github.com) and it does not support GHES endpoint URL (https://GHES/api/v3), yet.
https://github.com/actions/toolkit/blob/45c49b0/packages/tool-cache/src/tool-cache.ts#L596
So, manifest is always fetched from github.com.
IMHO, for GHES users, if getManifestFromRepo() is called at GHES instances, this should search manifest from GHES first, and get manifest from github.com as fallback. (similar behavior when actions were fetched on GHES self-runners).
Code Snippet
If applicable, add a code snippet to show the api enhancement.
Additional information
Add any other context about the feature here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with getManifestFromRepo() in packages/tool-cache/src/tool-cache.ts, especially the implementation referenced near line 596. Verify how the manifest URL is selected, then test the expected GHES-first behavior with github.com as fallback; done means manifests can be found from a GHES endpoint without breaking the existing public GitHub lookup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100