mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
sync
This commit is contained in:
parent
47c6a2430c
commit
d51c6ca39f
1 changed files with 7 additions and 1 deletions
|
|
@ -11,7 +11,13 @@ import { config } from "~/config"
|
|||
|
||||
const getLatestRelease = query(async () => {
|
||||
"use server"
|
||||
const response = await fetch("https://api.github.com/repos/sst/opencode/releases/latest")
|
||||
const response = await fetch("https://api.github.com/repos/sst/opencode/releases/latest", {
|
||||
headers: {
|
||||
"User-Agent":
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
|
||||
},
|
||||
})
|
||||
|
||||
if (!response.ok) return null
|
||||
const data = await response.json()
|
||||
return data.tag_name as string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue