tools: read the upstream project id anonymously

A fine-grained token can be scoped to the fork only; fdroiddata is public, so its project id needs no auth.
This commit is contained in:
austinried
2026-10-04 00:30:08 +00:00
parent 5003c9fb48
commit 51c8e86c97
+1 -1
View File
@@ -44,7 +44,7 @@ def main [
error make { msg: "GL_TOKEN is unset; it needs a GitLab token with the 'api' scope" }
}
let headers = { "PRIVATE-TOKEN": $token }
let upstream_id = (http get $"($api)/projects/($upstream)" --headers $headers | get id)
let upstream_id = (http get $"($api)/projects/($upstream)" | get id)
let branch_exists = (try { http get $"($api)/projects/($fork)/repository/branches/($branch)" --headers $headers } catch { null }) | is-not-empty
if not $branch_exists {