DownloadFileFromGitHubForHost downloads a file from a GitHub repository using the GitHub API, targeting a specific GitHub host. Use this when the target repository is on a different host than the one configured via GH_HOST (e.g., fetching from github.com while GH_HOST is a GHE instance). host is the
(owner, repo, path, ref, host string)
| 883 | // host is the hostname without scheme (e.g., "github.com", "myorg.ghe.com"). |
| 884 | // An empty host uses the default configured host (GH_HOST or github.com). |
| 885 | func DownloadFileFromGitHubForHost(owner, repo, path, ref, host string) ([]byte, error) { |
| 886 | return downloadFileFromGitHubWithDepth(owner, repo, path, ref, 0, host) |
| 887 | } |
| 888 | |
| 889 | // ResolveRefToSHAForHost resolves a git ref to its full commit SHA on a specific GitHub host. |
| 890 | // Use this when the target repository is on a different host than the one configured via GH_HOST. |
no test coverage detected