import{t as e}from"./config-BYRrjYC5.mjs";import{t}from"./got-BBDj7u1e.mjs";const n={path:`/branches/:user/:repo`,categories:[`programming`],example:`/github/branches/DIYgod/RSSHub`,parameters:{user:`User name`,repo:`Repo name`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`github.com/:user/:repo/branches`,`github.com/:user/:repo`]}],name:`Repo Branches`,maintainers:[`max-arnold`],handler:r};async function r(n){let r=n.req.param(`user`),i=n.req.param(`repo`),a=`https://github.com/${r}/${i}`,o=`https://api.github.com/repos/${r}/${i}/branches`,s={};e.github&&e.github.access_token&&(s.Authorization=`token ${e.github.access_token}`);let c=(await t({method:`get`,url:o,headers:s})).data;return{title:`${r}/${i} Branches`,link:`${a}/branches/all`,item:c.map(e=>({title:e.name,description:e.name,link:`${a}/commits/${e.name}`}))}}export{n as route};