diff --git a/src/data/repos.data.js b/src/data/repos.data.js index 5f2b9d17..df0e2d5d 100644 --- a/src/data/repos.data.js +++ b/src/data/repos.data.js @@ -2,7 +2,7 @@ import { ofetch } from 'ofetch' const baseURL = 'https://ungh.cc' -const excludes = ['waline-service'] +const whitelist = ['escrcpy', 'cleants', 'vite-uniapp-template', 'markvite', 'packages', 'environments'] async function getRepos() { const res = await ofetch(`${baseURL}/orgs/viarotel-org/repos`, { @@ -11,9 +11,15 @@ async function getRepos() { const repos = res?.repos || [] - const data = repos - .filter(item => !excludes.includes(item.name)) - .sort((a, b) => b.stars - a.stars) + const data = whitelist.reduce((arr, name) => { + const item = repos.find(item => item.name === name) + + if (item) { + arr.push(item) + } + + return arr + }, []) return data }