import{t as e}from"./config-BYRrjYC5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import r from"markdown-it";const i=r({html:!0}),a={path:`/releases/:owner/:repo`,categories:[`programming`],example:`/gitee/releases/y_project/RuoYi`,parameters:{owner:`用户名`,repo:`仓库名`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`gitee.com/:owner/:repo/releases`]}],name:`仓库 Releases`,maintainers:[`TonyRL`],handler:o};async function o(r){let{owner:a,repo:o}=r.req.param(),s=(await n(`https://gitee.com/api/v5/repos/${a}/${o}/releases`,{searchParams:{access_token:e.gitee.access_token??void 0,per_page:r.req.query(`limit`)?Number(r.req.query(`limit`)):100,direction:`desc`}})).data.map(e=>({title:e.tag_name,description:i.render(e.body),author:e.author.login,pubDate:t(e.created_at),guid:e.target_commitish,link:`https://gitee.com/${a}/${o}/releases/${e.tag_name}`}));return{title:`${a}/${o} - 发行版`,link:`https://gitee.com/${a}/${o}/releases`,item:s}}export{a as route};