DownloadFileFromGitHub downloads a file from a GitHub repository using the GitHub API. This is the exported wrapper for downloadFileFromGitHub. Parameters: - owner: Repository owner (e.g., "github") - repo: Repository name (e.g., "gh-aw") - path: Path to the file within the repository (e.g., ".githu
(owner, repo, path, ref string)
| 874 | // - ref: Git reference (branch, tag, or commit SHA) |
| 875 | // Returns the file content as bytes or an error if the file cannot be retrieved. |
| 876 | func DownloadFileFromGitHub(owner, repo, path, ref string) ([]byte, error) { |
| 877 | return downloadFileFromGitHubWithDepth(owner, repo, path, ref, 0, "") |
| 878 | } |
| 879 | |
| 880 | // DownloadFileFromGitHubForHost downloads a file from a GitHub repository using the GitHub API, |
| 881 | // targeting a specific GitHub host. Use this when the target repository is on a different host |
no test coverage detected