Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src/github-api-helper.ts
diff options
context:
space:
mode:
authoreric sciple <ericsciple@users.noreply.github.com>2019-12-09 17:06:03 -0500
committereric sciple <ericsciple@users.noreply.github.com>2019-12-09 17:06:03 -0500
commit60d4cd61a0add35bf3fff62db8d96cc40adbdcf3 (patch)
tree7f31ba9d5d8390093fc6b006a3b73a5b8923ca60 /src/github-api-helper.ts
parentb750541d2b898eda75e8a36fbee698c9c1978599 (diff)
.
Diffstat (limited to 'src/github-api-helper.ts')
-rw-r--r--src/github-api-helper.ts7
1 files changed, 6 insertions, 1 deletions
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<void> {
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)}`)