GitHubSecurityLab / actions-permissions

GitHub token permissions Monitor and Advisor actions
MIT License
244 stars 19 forks source link

Support GHES setup using the GITHUB_API_URL #19

Closed rajbos closed 2 weeks ago

rajbos commented 1 year ago

Load the API_URL environment variable and use that instead of api.github.com. Since GHES will have its address as https://custom.domain.com/api/v3, we only need to add the domain name itself.

Closes #8

JarLob commented 12 months ago

Hi, thank you for the pull request! What is the value of GITHUB_SERVER_URL in that case? I'm thinking maybe it can be just implemented as:

hosts.add(new URL(process.env.GITHUB_SERVER_URL).hostname);
hosts.add(new URL(process.env.GITHUB_API_URL).hostname);
JarLob commented 2 weeks ago

Imlemented in f62d32cd684392a758c627a58e0756b734bd54fd