[{"data":1,"prerenderedAt":547},["ShallowReactive",2],{"navigation_docs":3,"-platforms-gitea":80,"-platforms-gitea-surround":542},[4,56],{"title":5,"path":6,"stem":7,"children":8,"icon":55},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35,39,43,47,51],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Authentication","\u002Fguide\u002Fauth","1.guide\u002F02.auth",{"title":16,"path":17,"stem":18},"Repositories","\u002Fguide\u002Frepositories","1.guide\u002F03.repositories",{"title":20,"path":21,"stem":22},"Issues","\u002Fguide\u002Fissues","1.guide\u002F04.issues",{"title":24,"path":25,"stem":26},"Pull requests","\u002Fguide\u002Fpull-requests","1.guide\u002F05.pull-requests",{"title":28,"path":29,"stem":30},"Review threads","\u002Fguide\u002Fthreads","1.guide\u002F06.threads",{"title":32,"path":33,"stem":34},"Commits and CI","\u002Fguide\u002Fcommits","1.guide\u002F07.commits",{"title":36,"path":37,"stem":38},"Contribution templates","\u002Fguide\u002Ftemplates","1.guide\u002F08.templates",{"title":40,"path":41,"stem":42},"Code search","\u002Fguide\u002Fcode-search","1.guide\u002F09.code-search",{"title":44,"path":45,"stem":46},"Agents","\u002Fguide\u002Fagents","1.guide\u002F10.agents",{"title":48,"path":49,"stem":50},"Custom providers","\u002Fguide\u002Fcustom","1.guide\u002F11.custom",{"title":52,"path":53,"stem":54},"Explorer","\u002Fguide\u002Fexplorer","1.guide\u002F12.explorer","i-lucide-book-open",{"title":57,"path":58,"stem":59,"children":60,"icon":79},"Platforms","\u002Fplatforms","2.platforms\u002F0.index",[61,63,67,71,75],{"title":62,"path":58,"stem":59},"Overview",{"title":64,"path":65,"stem":66},"GitHub","\u002Fplatforms\u002Fgithub","2.platforms\u002F01.github",{"title":68,"path":69,"stem":70},"GitLab","\u002Fplatforms\u002Fgitlab","2.platforms\u002F02.gitlab",{"title":72,"path":73,"stem":74},"Gitea","\u002Fplatforms\u002Fgitea","2.platforms\u002F03.gitea",{"title":76,"path":77,"stem":78},"GitBucket","\u002Fplatforms\u002Fgitbucket","2.platforms\u002F04.gitbucket","i-lucide-library",{"id":81,"title":72,"body":82,"description":535,"extension":536,"links":537,"meta":538,"navigation":147,"path":73,"seo":540,"stem":74,"__hash__":541},"docs\u002F2.platforms\u002F03.gitea.md",{"type":83,"value":84,"toc":528},"minimark",[85,89,94,278,295,299,414,429,433,460,463,467,515,519,524],[86,87],"platform-facts",{"platform":88},"gitea",[90,91,93],"h2",{"id":92},"address-it","Address it",[95,96,101],"pre",{"className":97,"code":98,"language":99,"meta":100,"style":100},"language-ts shiki shiki-themes github-light github-light poimandres","import { createProvider } from \"@agntn\u002Fforges\";\n\nconst gitea = createProvider(\"gitea\", { token: process.env.GITEA_TOKEN }); \u002F\u002F gitea.com\nconst codeberg = createProvider(\"gitea\", { baseURL: \"https:\u002F\u002Fcodeberg.org\" });\nconst forgejo = createProvider(\"gitea\", { baseURL: \"https:\u002F\u002Fforgejo.example.com\" });\n","ts","",[102,103,104,142,149,206,243],"code",{"__ignoreMap":100},[105,106,109,113,117,121,124,128,132,136,139],"span",{"class":107,"line":108},"line",1,[105,110,112],{"class":111},"sP0CR","import",[105,114,116],{"class":115},"sKlNE"," {",[105,118,120],{"class":119},"snHMy"," createProvider",[105,122,123],{"class":115}," }",[105,125,127],{"class":126},"stCPd"," from",[105,129,131],{"class":130},"scVjq"," \"",[105,133,135],{"class":134},"sQ7BG","@agntn\u002Fforges",[105,137,138],{"class":130},"\"",[105,140,141],{"class":115},";\n",[105,143,145],{"class":107,"line":144},2,[105,146,148],{"emptyLinePlaceholder":147},true,"\n",[105,150,152,156,160,163,166,169,171,173,175,178,181,184,188,191,194,196,199,202],{"class":107,"line":151},3,[105,153,155],{"class":154},"s1TYA","const",[105,157,159],{"class":158},"saoiD"," gitea",[105,161,162],{"class":154}," =",[105,164,120],{"class":165},"sULi6",[105,167,168],{"class":115},"(",[105,170,138],{"class":130},[105,172,88],{"class":134},[105,174,138],{"class":130},[105,176,177],{"class":115},", {",[105,179,180],{"class":119}," token",[105,182,183],{"class":115},":",[105,185,187],{"class":186},"spVlQ"," process",[105,189,190],{"class":115},".",[105,192,193],{"class":186},"env",[105,195,190],{"class":115},[105,197,198],{"class":158},"GITEA_TOKEN",[105,200,201],{"class":115}," }); ",[105,203,205],{"class":204},"sjhu3","\u002F\u002F gitea.com\n",[105,207,209,211,214,216,218,220,222,224,226,228,231,233,235,238,240],{"class":107,"line":208},4,[105,210,155],{"class":154},[105,212,213],{"class":158}," codeberg",[105,215,162],{"class":154},[105,217,120],{"class":165},[105,219,168],{"class":115},[105,221,138],{"class":130},[105,223,88],{"class":134},[105,225,138],{"class":130},[105,227,177],{"class":115},[105,229,230],{"class":119}," baseURL",[105,232,183],{"class":115},[105,234,131],{"class":130},[105,236,237],{"class":134},"https:\u002F\u002Fcodeberg.org",[105,239,138],{"class":130},[105,241,242],{"class":115}," });\n",[105,244,246,248,251,253,255,257,259,261,263,265,267,269,271,274,276],{"class":107,"line":245},5,[105,247,155],{"class":154},[105,249,250],{"class":158}," forgejo",[105,252,162],{"class":154},[105,254,120],{"class":165},[105,256,168],{"class":115},[105,258,138],{"class":130},[105,260,88],{"class":134},[105,262,138],{"class":130},[105,264,177],{"class":115},[105,266,230],{"class":119},[105,268,183],{"class":115},[105,270,131],{"class":130},[105,272,273],{"class":134},"https:\u002F\u002Fforgejo.example.com",[105,275,138],{"class":130},[105,277,242],{"class":115},[279,280,281,284,285,287,288,291,292,294],"p",{},[102,282,283],{},"\u002Fapi\u002Fv1"," is added when the base URL lacks it. Forgejo is a Gitea fork with the same API, so Codeberg and every Forgejo instance go through this provider. The token chain reads ",[102,286,198],{},", then the ",[102,289,290],{},"tea"," config file for the host. ",[102,293,290],{}," has no command that prints the token, so the CLI step is skipped.",[90,296,298],{"id":297},"what-it-reads","What it reads",[300,301,302,315],"table",{},[303,304,305],"thead",{},[306,307,308,312],"tr",{},[309,310,311],"th",{},"Resource",[309,313,314],{},"Endpoint",[316,317,318,333,349,365,378,388,401],"tbody",{},[306,319,320,324],{},[321,322,323],"td",{},"repos",[321,325,326,329,330],{},[102,327,328],{},"GET \u002Frepos\u002F:owner\u002F:repo",", ",[102,331,332],{},"GET \u002Fusers\u002F:owner\u002Frepos",[306,334,335,338],{},[321,336,337],{},"issues",[321,339,340,329,343,329,346],{},[102,341,342],{},"GET \u002Frepos\u002F:owner\u002F:repo\u002Fissues",[102,344,345],{},"POST …\u002Fissues",[102,347,348],{},"…\u002Fissues\u002F:index\u002Fcomments",[306,350,351,354],{},[321,352,353],{},"pull requests",[321,355,356,329,359,329,362],{},[102,357,358],{},"GET \u002Frepos\u002F:owner\u002F:repo\u002Fpulls",[102,360,361],{},"…\u002Fpulls\u002F:index\u002Ffiles",[102,363,364],{},"…\u002Fcommits\u002F:sha\u002Fstatus",[306,366,367,370],{},[321,368,369],{},"commits",[321,371,372,329,375],{},[102,373,374],{},"GET \u002Frepos\u002F:owner\u002F:repo\u002Fcommits",[102,376,377],{},"…\u002Fgit\u002Fcommits\u002F:sha",[306,379,380,383],{},[321,381,382],{},"CI runs",[321,384,385],{},[102,386,387],{},"GET \u002Frepos\u002F:owner\u002F:repo\u002Factions\u002Fruns",[306,389,390,393],{},[321,391,392],{},"threads",[321,394,395,329,398],{},[102,396,397],{},"GET \u002Frepos\u002F:owner\u002F:repo\u002Fpulls\u002F:index\u002Freviews",[102,399,400],{},"…\u002Freviews\u002F:id\u002Fcomments",[306,402,403,406],{},[321,404,405],{},"templates",[321,407,408,329,411],{},[102,409,410],{},"GET \u002Frepos\u002F:owner\u002F:repo\u002Fcontents\u002F.gitea\u002F…",[102,412,413],{},".github\u002F…",[279,415,416,417,420,421,424,425,428],{},"Pagination uses ",[102,418,419],{},"limit",", not ",[102,422,423],{},"per_page",", and reads the ",[102,426,427],{},"Link"," header.",[90,430,432],{"id":431},"what-comes-back","What comes back",[279,434,435,436,439,440,443,444,447,448,451,452,455,456,459],{},"Fields Gitea leaves out come back empty rather than undefined: ",[102,437,438],{},"company"," is ",[102,441,442],{},"\"\"",", counts per file on a commit are ",[102,445,446],{},"null",". Every review comment is its own ",[102,449,450],{},"Thread"," with one comment, because the API has no parent id on review comments. ",[102,453,454],{},"isOutdated"," is always ",[102,457,458],{},"false",". Pull request checks are the commit statuses of the head SHA.",[279,461,462],{},"Templates are repository scope only. There is no owner inheritance to claim, so none is claimed.",[90,464,466],{"id":465},"gotchas","Gotchas",[468,469,470,492,503,506,509],"ul",{},[471,472,473,476,477,480,481,329,484,487,488,491],"li",{},[102,474,475],{},"commits.list"," rejects the ",[102,478,479],{},"path"," filter. The API ignores pagination limits for it and would hand you the whole history. ",[102,482,483],{},"ref",[102,485,486],{},"since"," and ",[102,489,490],{},"until"," work.",[471,493,494,495,498,499,502],{},"Code search does not exist. ",[102,496,497],{},"code.search"," is a ",[102,500,501],{},"ForgesError"," with status 501 and a sentence.",[471,504,505],{},"Discussion comments arrive as one response, so the page you asked for is cut locally.",[471,507,508],{},"Older Forgejo responses keep an Actions run's branch only inside the webhook payload. It is read from there when the top level field is missing.",[471,510,511,512,514],{},"Combined statuses on Forgejo paginate without a ",[102,513,427],{}," header. The next page is probed only when the current one is full.",[90,516,518],{"id":517},"where-it-lives","Where it lives",[279,520,521,190],{},[102,522,523],{},"src\u002Fproviders\u002Fgitea.ts",[525,526,527],"style",{},"html pre.shiki code .sP0CR, html code.shiki .sP0CR{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#5DE4C7}html pre.shiki code .sKlNE, html code.shiki .sKlNE{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#A6ACCD}html pre.shiki code .snHMy, html code.shiki .snHMy{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#ADD7FF}html pre.shiki code .stCPd, html code.shiki .stCPd{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#A6ACCD}html pre.shiki code .scVjq, html code.shiki .scVjq{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#A6ACCD}html pre.shiki code .sQ7BG, html code.shiki .sQ7BG{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#5DE4C7}html pre.shiki code .s1TYA, html code.shiki .s1TYA{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#91B4D5}html pre.shiki code .saoiD, html code.shiki .saoiD{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#E4F0FB}html pre.shiki code .sULi6, html code.shiki .sULi6{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#E4F0FBD0}html pre.shiki code .spVlQ, html code.shiki .spVlQ{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E4F0FB}html pre.shiki code .sjhu3, html code.shiki .sjhu3{--shiki-light:#6A737D;--shiki-light-font-style:inherit;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#767C9DB0;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":100,"searchDepth":144,"depth":144,"links":529},[530,531,532,533,534],{"id":92,"depth":144,"text":93},{"id":297,"depth":144,"text":298},{"id":431,"depth":144,"text":432},{"id":465,"depth":144,"text":466},{"id":517,"depth":144,"text":518},"API v1 with limit instead of per_page, empty strings and nulls where fields are missing, and Codeberg or any Forgejo instance through baseURL.","md",null,{"icon":539},"i-simple-icons-gitea",{"title":72,"description":535},"KVuY87VNtyZkJik32uHBJggJO7CUNGYIWL4TRLrSfa0",[543,545],{"title":68,"path":69,"stem":70,"description":544,"children":-1},"API v4 with Private-Token auth, project ids resolved and cached for you, iid as the number, and a group fallback for owners that are not users.",{"title":76,"path":77,"stem":78,"description":546,"children":-1},"The GitHub provider pointed at a GitBucket \u002Fapi\u002Fv3. What GitBucket does not serve fails with a sentence, not a 404.",1788525966686]