diff options
| author | Dax Raad <[email protected]> | 2025-07-22 17:06:06 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-07-22 17:06:06 -0400 |
| commit | c2208fa1f931cc48cd35a430d483c2dbe317d02a (patch) | |
| tree | 4f51327b4ef5fb5d1aa952912a993a34db903604 /packages | |
| parent | bf42d8b0116933018a583b1e80baa57e801f6651 (diff) | |
| download | opencode-c2208fa1f931cc48cd35a430d483c2dbe317d02a.tar.gz opencode-c2208fa1f931cc48cd35a430d483c2dbe317d02a.zip | |
ci: error github api fail
Diffstat (limited to 'packages')
| -rwxr-xr-x | packages/opencode/script/publish.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.ts index 1064a87e0..a326b69eb 100755 --- a/packages/opencode/script/publish.ts +++ b/packages/opencode/script/publish.ts @@ -90,7 +90,10 @@ if (!snapshot) { } const previous = await fetch("https://api.github.com/repos/sst/opencode/releases/latest") - .then((res) => res.json()) + .then((res) => { + if (!res.ok) throw new Error(res.statusText) + return res.json() + }) .then((data) => data.tag_name) console.log("finding commits between", previous, "and", "HEAD") |
