From 60d4cd61a0add35bf3fff62db8d96cc40adbdcf3 Mon Sep 17 00:00:00 2001 From: eric sciple Date: Mon, 9 Dec 2019 17:06:03 -0500 Subject: . --- src/github-api-helper.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/github-api-helper.ts') diff --git a/src/github-api-helper.ts b/src/github-api-helper.ts index 3da0154..44fdd73 100644 --- a/src/github-api-helper.ts +++ b/src/github-api-helper.ts @@ -12,12 +12,17 @@ export async function downloadRepository( ): Promise { const octokit = new github.GitHub(accessToken) const params: ReposGetArchiveLinkParams = { - archive_format: IS_WINDOWS ? 'zipball' : 'tarball', + archive_format: IS_WINDOWS ? 'zipball' : 'tarballl', owner: owner, repo: repo, ref: ref } const response = await octokit.repos.getArchiveLink(params) + if (response.status != 200) { + throw new Error( + `GitHub API call failed with response status '${response.status}': ${response.data}` + ) + } console.log(`status=${response.status}`) console.log(`headers=${JSON.stringify(response.headers)}`) console.log(`data=${JSON.stringify(typeof response.data)}`) -- cgit v1.2.3