feat: add update version banner (#365)

feat: add update version banenr
This commit is contained in:
boojack
2022-10-29 17:49:50 +08:00
committed by GitHub
parent 1e01c4dc46
commit 43541bde2c
4 changed files with 92 additions and 1 deletions

View File

@ -189,3 +189,13 @@ export async function getRepoStarCount() {
});
return data.stargazers_count as number;
}
export async function getRepoLatestTag() {
const { data } = await axios.get(`https://api.github.com/repos/usememos/memos/tags`, {
headers: {
Accept: "application/vnd.github.v3.star+json",
Authorization: "",
},
});
return data[0].name as string;
}