feat: increase tag retrieval limit and refine alpha tag identification

This commit is contained in:
Tunglies 2025-03-11 00:56:35 +08:00
parent 3c7768b379
commit c6dce2d6cb

View File

@ -23,7 +23,7 @@ async function resolveUpdater() {
const { data: tags } = await github.rest.repos.listTags({
...options,
per_page: 20, // Increase to have more chances to find alpha tags
per_page: 50, // Increase to have more chances to find alpha tags
page: 1,
});
@ -31,8 +31,11 @@ async function resolveUpdater() {
const stableTag = tags.find(
(t) => t.name.startsWith("v") && !t.name.includes("alpha"),
);
const alphaTag = tags.find((t) => t.name.includes("alpha"));
const alphaTag = tags.find(
(t) => t.name.startsWith("alpha") && !t.name.includes("v"),
);
console.log(tags);
console.log("Stable tag:", stableTag);
console.log("Alpha tag:", alphaTag);
console.log();