actions / actions/toolkit

tool-cache.getManifestFromRepo() has hard coded URL and does not support GHES repo

Open
#1,492 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.