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:
Diffstat (limited to 'src/github-api-helper.ts')
-rw-r--r--src/github-api-helper.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/github-api-helper.ts b/src/github-api-helper.ts
index cadd13b..45b979a 100644
--- a/src/github-api-helper.ts
+++ b/src/github-api-helper.ts
@@ -92,7 +92,10 @@ export async function getDefaultBranch(
assert.ok(result, 'default_branch cannot be empty')
} catch (err) {
// Handle .wiki repo
- if (err['status'] === 404 && repo.toUpperCase().endsWith('.WIKI')) {
+ if (
+ (err as any)?.status === 404 &&
+ repo.toUpperCase().endsWith('.WIKI')
+ ) {
result = 'master'
}
// Otherwise error