[{"data":1,"prerenderedAt":752},["ShallowReactive",2],{"navigation_docs":3,"-platforms-gitcafe":100,"-platforms-gitcafe-surround":747},[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, CI and releases","\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":99},"Platforms","\u002Fplatforms","2.platforms\u002F0.index",[61,63,67,71,75,79,83,87,91,95],{"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},"Bitbucket","\u002Fplatforms\u002Fbitbucket","2.platforms\u002F04.bitbucket",{"title":80,"path":81,"stem":82},"Gitee","\u002Fplatforms\u002Fgitee","2.platforms\u002F05.gitee",{"title":84,"path":85,"stem":86},"Azure DevOps","\u002Fplatforms\u002Fazure-devops","2.platforms\u002F06.azure-devops",{"title":88,"path":89,"stem":90},"GitCafe","\u002Fplatforms\u002Fgitcafe","2.platforms\u002F07.gitcafe",{"title":92,"path":93,"stem":94},"GitBucket","\u002Fplatforms\u002Fgitbucket","2.platforms\u002F08.gitbucket",{"title":96,"path":97,"stem":98},"Artifacts","\u002Fplatforms\u002Fartifacts","2.platforms\u002F09.artifacts","i-lucide-library",{"id":101,"title":88,"body":102,"description":739,"extension":740,"links":741,"meta":742,"navigation":152,"path":89,"seo":744,"stem":90,"__hash__":746},"docs\u002F2.platforms\u002F07.gitcafe.md",{"type":103,"value":104,"toc":729},"minimark",[105,109,114,327,335,346,360,365,371,402,409,416,427,431,444,556,560,599,603,606,674,678,681,692,695,701,705,725],[106,107],"platform-facts",{"platform":108},"gitcafe",[110,111,113],"h2",{"id":112},"read-a-gitcafe-repository","Read a GitCafe repository",[115,116,121],"pre",{"className":117,"code":118,"language":119,"meta":120,"style":120},"language-ts shiki shiki-themes forges forges forges","import { createProvider } from \"@agntn\u002Fforges\";\n\nconst gitcafe = await createProvider(\"gitcafe\", {\n  token: process.env.CAFE_TOKEN,\n});\n\nconst repo = { owner: \"versecafe\", repo: \"ashlar\" };\nconst ashlar = await gitcafe.repos.get(repo);\nconst pull = await gitcafe.pullRequests.get({ ...repo, number: 1 });\nconst threads = await gitcafe.threads.list({ ...repo, number: 2 }, { state: \"all\" });\nconst manifest = await gitcafe.repos.readContents(repo, { path: \"package.json\" });\n","ts","",[122,123,124,147,154,182,188,194,199,224,245,271,302],"code",{"__ignoreMap":120},[125,126,129,133,137,140,144],"span",{"class":127,"line":128},"line",1,[125,130,132],{"class":131},"skH_V","import",[125,134,136],{"class":135},"s38Sx"," { createProvider } ",[125,138,139],{"class":131},"from",[125,141,143],{"class":142},"shU9J"," \"@agntn\u002Fforges\"",[125,145,146],{"class":135},";\n",[125,148,150],{"class":127,"line":149},2,[125,151,153],{"emptyLinePlaceholder":152},true,"\n",[125,155,157,160,163,166,169,173,176,179],{"class":127,"line":156},3,[125,158,159],{"class":131},"const",[125,161,162],{"class":135}," gitcafe ",[125,164,165],{"class":131},"=",[125,167,168],{"class":131}," await",[125,170,172],{"class":171},"sK71F"," createProvider",[125,174,175],{"class":135},"(",[125,177,178],{"class":142},"\"gitcafe\"",[125,180,181],{"class":135},", {\n",[125,183,185],{"class":127,"line":184},4,[125,186,187],{"class":135},"  token: process.env.CAFE_TOKEN,\n",[125,189,191],{"class":127,"line":190},5,[125,192,193],{"class":135},"});\n",[125,195,197],{"class":127,"line":196},6,[125,198,153],{"emptyLinePlaceholder":152},[125,200,202,204,207,209,212,215,218,221],{"class":127,"line":201},7,[125,203,159],{"class":131},[125,205,206],{"class":135}," repo ",[125,208,165],{"class":131},[125,210,211],{"class":135}," { owner: ",[125,213,214],{"class":142},"\"versecafe\"",[125,216,217],{"class":135},", repo: ",[125,219,220],{"class":142},"\"ashlar\"",[125,222,223],{"class":135}," };\n",[125,225,227,229,232,234,236,239,242],{"class":127,"line":226},8,[125,228,159],{"class":131},[125,230,231],{"class":135}," ashlar ",[125,233,165],{"class":131},[125,235,168],{"class":131},[125,237,238],{"class":135}," gitcafe.repos.",[125,240,241],{"class":171},"get",[125,243,244],{"class":135},"(repo);\n",[125,246,248,250,253,255,257,260,262,265,268],{"class":127,"line":247},9,[125,249,159],{"class":131},[125,251,252],{"class":135}," pull ",[125,254,165],{"class":131},[125,256,168],{"class":131},[125,258,259],{"class":135}," gitcafe.pullRequests.",[125,261,241],{"class":171},[125,263,264],{"class":135},"({ ",[125,266,267],{"class":131},"...",[125,269,270],{"class":135},"repo, number: 1 });\n",[125,272,274,276,279,281,283,286,289,291,293,296,299],{"class":127,"line":273},10,[125,275,159],{"class":131},[125,277,278],{"class":135}," threads ",[125,280,165],{"class":131},[125,282,168],{"class":131},[125,284,285],{"class":135}," gitcafe.threads.",[125,287,288],{"class":171},"list",[125,290,264],{"class":135},[125,292,267],{"class":131},[125,294,295],{"class":135},"repo, number: 2 }, { state: ",[125,297,298],{"class":142},"\"all\"",[125,300,301],{"class":135}," });\n",[125,303,305,307,310,312,314,316,319,322,325],{"class":127,"line":304},11,[125,306,159],{"class":131},[125,308,309],{"class":135}," manifest ",[125,311,165],{"class":131},[125,313,168],{"class":131},[125,315,238],{"class":135},[125,317,318],{"class":171},"readContents",[125,320,321],{"class":135},"(repo, { path: ",[125,323,324],{"class":142},"\"package.json\"",[125,326,301],{"class":135},[328,329,330,331,334],"p",{},"GitCafe IDs have prefixes, like ",[122,332,333],{},"repo_01kt3jc1ktfcf8nrrqrqs1wf0d",". Issue and pull request numbers stay plain numbers. No prefix there.",[328,336,337,338,341,342,345],{},"Looking for page numbers? Every list uses a ",[122,339,340],{},"next"," token in the response body. forges returns it as ",[122,343,344],{},"nextCursor",".",[328,347,348,349,352,353,356,357,345],{},"The default API base is ",[122,350,351],{},"https:\u002F\u002Fgit.cafe\u002Fapi",". forges adds ",[122,354,355],{},"\u002Fapi"," when it's missing. The MCP server and Pi\u002FOMP extensions read ",[122,358,359],{},"FORGES_GITCAFE_BASE_URL",[361,362,364],"h3",{"id":363},"where-does-the-token-come-from","Where does the token come from?",[328,366,367,370],{},[122,368,369],{},"@agntn\u002Fcredentials\u002Fgitcafe"," checks these sources in order:",[372,373,374,381,386,396],"ol",{},[375,376,377,378,345],"li",{},"An explicit ",[122,379,380],{},"{ token }",[375,382,383,345],{},[122,384,385],{},"CAFE_TOKEN",[375,387,388,389,392,393,345],{},"The ",[122,390,391],{},"cafe"," CLI's login helper, ",[122,394,395],{},"cafe auth http credential get",[375,397,398,401],{},[122,399,400],{},"gitcafe\u002Fcredentials.json"," under the XDG config directory.",[328,403,404,405,408],{},"Run ",[122,406,407],{},"cafe auth login"," to save a login. An expired saved login is skipped.",[328,410,411,412,415],{},"A ",[122,413,414],{},"gct_"," personal access token comes from GitCafe Settings, Tokens. It's sent as a Bearer token. GitCafe MCP tokens don't work on the REST API.",[328,417,418,419,422,423,426],{},"Pass ",[122,420,421],{},"{ token: \"\" }"," to read public repositories anonymously. ",[122,424,425],{},"users.authenticated"," needs a token.",[110,428,430],{"id":429},"what-it-reads","What it reads",[328,432,433,434,436,437,440,441,345],{},"Endpoints are relative to ",[122,435,355],{},". Here, ",[122,438,439],{},"…"," means ",[122,442,443],{},"\u002Frepos\u002F:owner\u002F:repo",[445,446,447,460],"table",{},[448,449,450],"thead",{},[451,452,453,457],"tr",{},[454,455,456],"th",{},"Resource",[454,458,459],{},"Endpoint",[461,462,463,481,496,512,525,546],"tbody",{},[451,464,465,469],{},[466,467,468],"td",{},"Repositories and tags",[466,470,471,474,475,474,478],{},[122,472,473],{},"GET …\u002F",", ",[122,476,477],{},"GET \u002Fexplore\u002Frepos?owner=",[122,479,480],{},"GET …\u002Frefs?kind=tags",[451,482,483,485],{},[466,484,20],{},[466,486,487,474,490,474,493],{},[122,488,489],{},"GET …\u002Fissues",[122,491,492],{},"GET …\u002Fissues\u002F:number",[122,494,495],{},"GET …\u002Fissues\u002F:number\u002Fcomments\u002F",[451,497,498,500],{},[466,499,24],{},[466,501,502,474,505,508,509],{},[122,503,504],{},"GET …\u002Fpulls",[122,506,507],{},"GET …\u002Fpulls\u002F:number"," with its labels, assignees and reviewers, ",[122,510,511],{},"GET …\u002Fpulls\u002F:number\u002Fcomments\u002F",[451,513,514,517],{},[466,515,516],{},"Commits",[466,518,519,474,522],{},[122,520,521],{},"GET …\u002Fcommits",[122,523,524],{},"GET …\u002Fcommit?oid=",[451,526,527,530],{},[466,528,529],{},"Repository contents",[466,531,532,535,536,474,539,542,543],{},[122,533,534],{},"GET …\u002Fcommit?ref="," to resolve, then ",[122,537,538],{},"GET …\u002Fblob",[122,540,541],{},"GET …\u002Ftree"," or ",[122,544,545],{},"GET …\u002Fraw",[451,547,548,551],{},[466,549,550],{},"CI runs",[466,552,553],{},[122,554,555],{},"GET …\u002Factions\u002Fruns",[110,557,559],{"id":558},"what-comes-back","What comes back",[561,562,563,569,572,575,585,588],"ul",{},[375,564,565,566,345],{},"Inline pull request comments group into threads with a path and line. A thread is resolved when GitCafe sets ",[122,567,568],{},"resolvedAt",[375,570,571],{},"Reply, resolve and unresolve use the adapter and need a token. The upstream adapter marks GitCafe writes as unverified.",[375,573,574],{},"Issue and pull request events contain comments only. Pull request checks and commit checks read GitCafe's checks.",[375,576,577,578,581,582,345],{},"GitCafe stacks pull requests, but forges serves each cup separately. Each reads as a regular pull request with its own ",[122,579,580],{},"sourceBranch"," and ",[122,583,584],{},"targetBranch",[375,586,587],{},"A bare ref tries a branch first, then a tag. A full SHA, all 40 hex characters, is a commit.",[375,589,590,591,594,595,598],{},"File reads resolve the ref to a commit first. Binary bytes come from ",[122,592,593],{},"\u002Fraw"," when ",[122,596,597],{},"\u002Fblob"," returns null content.",[110,600,602],{"id":601},"gotchas","Gotchas",[328,604,605],{},"What happens when a path is a directory?",[561,607,608,623,634,645,661,667],{},[375,609,411,610,612,613,616,617,620,621,345],{},[122,611,597],{}," response with status 400 and code ",[122,614,615],{},"invalid"," sends forges to ",[122,618,619],{},"\u002Ftree",". The root goes straight to ",[122,622,619],{},[375,624,625,626,629,630,633],{},"Directory listings cover one level and report ",[122,627,628],{},"size: null",". After 10 pages of 200 rows, ",[122,631,632],{},"entriesComplete"," is false. Files over 1 MiB get a 413.",[375,635,636,637,640,641,644],{},"Owner ",[122,638,639],{},"repos.list"," rejects ",[122,642,643],{},"perPage"," over 50 with a 400 before any request. Other lists keep the usual 1 to 100.",[375,646,647,650,651,474,654,581,657,660],{},[122,648,649],{},"commits.list"," filters by ref only. ",[122,652,653],{},"path",[122,655,656],{},"since",[122,658,659],{},"until"," get a 501 before any request. The whole history masquerading as filtered results is garbage.",[375,662,663,666],{},[122,664,665],{},"ciRuns.list"," reads Actions runs and filters by branch. A workflow filter gets a 501 before any request.",[375,668,669,670,673],{},"The explorer at forges.agntn.dev doesn't run GitCafe. Pi and OMP recognize ",[122,671,672],{},"https:\u002F\u002Fgit.cafe\u002Fowner\u002Frepo"," remotes.",[110,675,677],{"id":676},"what-isnt-there","What isn't there",[328,679,680],{},"These operations return 501 with a sentence, rather than pretending to work.",[328,682,683,684,687,688,691],{},"Releases are marked not applicable by the upstream adapter. GitCafe does have a ",[122,685,686],{},"\u002Freleases"," API. Commit comparison is also out: ",[122,689,690],{},"\u002Fcompare"," lists changed files, not commits.",[328,693,694],{},"Commit patches, code search, issue search, pull request search and commit search return 501. So do reactions, pull request reviews listing, issue types and fields, sub issues and contribution templates.",[328,696,697,700],{},[122,698,699],{},"ciRuns.listJobs"," and job logs return 501 too.",[110,702,704],{"id":703},"where-it-lives","Where it lives",[328,706,707,710,711,714,715,718,719,722,723,345],{},[122,708,709],{},"GitCafeProvider"," lives in ",[122,712,713],{},"src\u002Fproviders\u002Fgitcafe.ts",". Import it from ",[122,716,717],{},"@agntn\u002Fforges\u002Fgitcafe",". It uses the upstream ",[122,720,721],{},"forges\u002Fgitcafe"," adapter and ",[122,724,369],{},[726,727,728],"style",{},"html pre.shiki code .skH_V, html code.shiki .skH_V{--shiki-light:var(--shiki-token-keyword);--shiki-default:var(--shiki-token-keyword);--shiki-dark:var(--shiki-token-keyword)}html pre.shiki code .s38Sx, html code.shiki .s38Sx{--shiki-light:var(--ui-text-highlighted);--shiki-default:var(--ui-text-highlighted);--shiki-dark:var(--ui-text-highlighted)}html pre.shiki code .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}html pre.shiki code .sK71F, html code.shiki .sK71F{--shiki-light:var(--shiki-token-function);--shiki-default:var(--shiki-token-function);--shiki-dark:var(--shiki-token-function)}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":120,"searchDepth":149,"depth":149,"links":730},[731,734,735,736,737,738],{"id":112,"depth":149,"text":113,"children":732},[733],{"id":363,"depth":156,"text":364},{"id":429,"depth":149,"text":430},{"id":558,"depth":149,"text":559},{"id":601,"depth":149,"text":602},{"id":676,"depth":149,"text":677},{"id":703,"depth":149,"text":704},"GitCafe repositories, pull requests, review threads and files in the same shapes as every other forge. Public ones read without a token.","md",null,{"icon":743},"i-lucide-coffee",{"title":745,"description":739},"Read GitCafe issues, pull requests and files with forges","AAX6e260N8b9PbOv8sC_Fyo9tItEhAWPCfXT4vAVkQg",[748,750],{"title":84,"path":85,"stem":86,"description":749,"children":-1},"Azure DevOps repositories, pull requests and work items in the same shapes as every other forge. The owner is organization\u002Fproject.",{"title":92,"path":93,"stem":94,"description":751,"children":-1},"The GitHub provider pointed at a GitBucket \u002Fapi\u002Fv3. What GitBucket does not serve fails with a sentence, not a 404.",1795459377793]