[{"data":1,"prerenderedAt":543},["ShallowReactive",2],{"navigation_docs":3,"-concepts-providers":195,"-concepts-providers-surround":538},[4,23,65,87,133,155,173],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":22},"Getting started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,14,18],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":19,"path":20,"stem":21},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",false,{"title":24,"icon":25,"path":26,"stem":27,"children":28,"page":22},"Guides","i-lucide-compass","\u002Fguides","2.guides",[29,33,37,41,45,49,53,57,61],{"title":30,"path":31,"stem":32},"Authenticate","\u002Fguides\u002Fauthentication","2.guides\u002F1.authentication",{"title":34,"path":35,"stem":36},"Work with several forges","\u002Fguides\u002Fmultiple-forges","2.guides\u002F2.multiple-forges",{"title":38,"path":39,"stem":40},"Configure from the environment","\u002Fguides\u002Fenvironment","2.guides\u002F3.environment",{"title":42,"path":43,"stem":44},"Receive webhooks","\u002Fguides\u002Fwebhooks","2.guides\u002F4.webhooks",{"title":46,"path":47,"stem":48},"Check what a forge supports","\u002Fguides\u002Fcapabilities","2.guides\u002F5.capabilities",{"title":50,"path":51,"stem":52},"Handle errors and rate limits","\u002Fguides\u002Ferrors","2.guides\u002F6.errors",{"title":54,"path":55,"stem":56},"Page through results","\u002Fguides\u002Fpagination","2.guides\u002F7.pagination",{"title":58,"path":59,"stem":60},"Browser bundles","\u002Fguides\u002Fbundling","2.guides\u002F8.bundling",{"title":62,"path":63,"stem":64},"Test your code","\u002Fguides\u002Ftesting","2.guides\u002F9.testing",{"title":66,"icon":67,"path":68,"stem":69,"children":70,"page":22},"Concepts","i-lucide-lightbulb","\u002Fconcepts","3.concepts",[71,75,79,83],{"title":72,"path":73,"stem":74},"Data model","\u002Fconcepts\u002Fdata-model","3.concepts\u002F1.data-model",{"title":76,"path":77,"stem":78},"Capabilities","\u002Fconcepts\u002Fcapabilities","3.concepts\u002F2.capabilities",{"title":80,"path":81,"stem":82},"Providers and factories","\u002Fconcepts\u002Fproviders","3.concepts\u002F3.providers",{"title":84,"path":85,"stem":86},"Events","\u002Fconcepts\u002Fevents","3.concepts\u002F4.events",{"title":88,"icon":89,"path":90,"stem":91,"children":92,"page":22},"Providers","i-lucide-server","\u002Fproviders","4.providers",[93,97,101,105,109,113,117,121,125,129],{"title":94,"path":95,"stem":96},"Azure DevOps","\u002Fproviders\u002Fazure-devops","4.providers\u002Fazure-devops",{"title":98,"path":99,"stem":100},"Bitbucket Cloud","\u002Fproviders\u002Fbitbucket","4.providers\u002Fbitbucket",{"title":102,"path":103,"stem":104},"Cursor Origin","\u002Fproviders\u002Fcursor-origin","4.providers\u002Fcursor-origin",{"title":106,"path":107,"stem":108},"Forgejo and Codeberg","\u002Fproviders\u002Fforgejo","4.providers\u002Fforgejo",{"title":110,"path":111,"stem":112},"Gitea","\u002Fproviders\u002Fgitea","4.providers\u002Fgitea",{"title":114,"path":115,"stem":116},"Gitee","\u002Fproviders\u002Fgitee","4.providers\u002Fgitee",{"title":118,"path":119,"stem":120},"GitHub","\u002Fproviders\u002Fgithub","4.providers\u002Fgithub",{"title":122,"path":123,"stem":124},"GitLab","\u002Fproviders\u002Fgitlab","4.providers\u002Fgitlab",{"title":126,"path":127,"stem":128},"pushin.eu","\u002Fproviders\u002Fpushin","4.providers\u002Fpushin",{"title":130,"path":131,"stem":132},"Tangled","\u002Fproviders\u002Ftangled","4.providers\u002Ftangled",{"title":134,"icon":135,"path":136,"stem":137,"children":138,"page":22},"Reference","i-lucide-book-marked","\u002Freference","5.reference",[139,143,147,151],{"title":140,"path":141,"stem":142},"Provider API","\u002Freference\u002Fprovider-api","5.reference\u002F1.provider-api",{"title":144,"path":145,"stem":146},"Capability matrix","\u002Freference\u002Fcapability-matrix","5.reference\u002F2.capability-matrix",{"title":148,"path":149,"stem":150},"Errors","\u002Freference\u002Ferrors","5.reference\u002F3.errors",{"title":152,"path":153,"stem":154},"JSON Schemas","\u002Freference\u002Fjson-schemas","5.reference\u002F5.json-schemas",{"title":156,"icon":157,"path":158,"stem":159,"children":160,"page":22},"Examples","i-lucide-boxes","\u002Fexamples","6.examples",[161,165,169],{"title":162,"path":163,"stem":164},"Inbox CLI","\u002Fexamples\u002Finbox-cli","6.examples\u002F1.inbox-cli",{"title":166,"path":167,"stem":168},"Label bot","\u002Fexamples\u002Flabel-bot","6.examples\u002F2.label-bot",{"title":170,"path":171,"stem":172},"Release digest","\u002Fexamples\u002Frelease-digest","6.examples\u002F3.release-digest",{"title":174,"icon":175,"path":176,"stem":177,"children":178,"page":22},"Contributing","i-lucide-git-pull-request","\u002Fcontributing","7.contributing",[179,183,187,191],{"title":180,"path":181,"stem":182},"Contribution guide","\u002Fcontributing\u002Fguidelines","7.contributing\u002F1.guidelines",{"title":184,"path":185,"stem":186},"Write a provider","\u002Fcontributing\u002Fwrite-a-provider","7.contributing\u002F2.write-a-provider",{"title":188,"path":189,"stem":190},"Record fixtures","\u002Fcontributing\u002Frecord-fixtures","7.contributing\u002F3.record-fixtures",{"title":192,"path":193,"stem":194},"Contributors","\u002Fcontributing\u002Fcontributors","7.contributing\u002F4.contributors",{"id":196,"title":80,"body":197,"description":531,"extension":532,"links":533,"meta":534,"navigation":267,"path":81,"seo":536,"stem":82,"__hash__":537},"docs\u002F3.concepts\u002F3.providers.md",{"type":198,"value":199,"toc":523},"minimark",[200,204,209,220,374,383,387,453,462,466,475,478,482,491,495,506,510,519],[201,202,203],"p",{},"This page explains how you create a provider, what every provider contains and how the Lite factories differ.",[205,206,208],"h2",{"id":207},"factories","Factories",[201,210,211,215,216,219],{},[212,213,214],"code",{},"github()"," and the other provider functions return a factory. A factory holds the options and builds the provider when you call ",[212,217,218],{},"create()",". No request goes out until you call a method on the provider.",[221,222,227],"pre",{"className":223,"code":224,"language":225,"meta":226,"style":226},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { github } from 'forges\u002Fgithub'\n\nconst factory = github({\n  auth: { type: 'token', token: process.env.GITHUB_TOKEN! },\n})\nconst gh = factory.create()\n","ts","",[212,228,229,262,269,291,344,353],{"__ignoreMap":226},[230,231,234,238,242,246,249,252,255,259],"span",{"class":232,"line":233},"line",1,[230,235,237],{"class":236},"s7zQu","import",[230,239,241],{"class":240},"sMK4o"," {",[230,243,245],{"class":244},"sTEyZ"," github",[230,247,248],{"class":240}," }",[230,250,251],{"class":236}," from",[230,253,254],{"class":240}," '",[230,256,258],{"class":257},"sfazB","forges\u002Fgithub",[230,260,261],{"class":240},"'\n",[230,263,265],{"class":232,"line":264},2,[230,266,268],{"emptyLinePlaceholder":267},true,"\n",[230,270,272,276,279,282,285,288],{"class":232,"line":271},3,[230,273,275],{"class":274},"spNyl","const",[230,277,278],{"class":244}," factory ",[230,280,281],{"class":240},"=",[230,283,245],{"class":284},"s2Zo4",[230,286,287],{"class":244},"(",[230,289,290],{"class":240},"{\n",[230,292,294,298,301,303,306,308,310,313,316,319,322,324,327,330,333,335,338,341],{"class":232,"line":293},4,[230,295,297],{"class":296},"swJcz","  auth",[230,299,300],{"class":240},":",[230,302,241],{"class":240},[230,304,305],{"class":296}," type",[230,307,300],{"class":240},[230,309,254],{"class":240},[230,311,312],{"class":257},"token",[230,314,315],{"class":240},"'",[230,317,318],{"class":240},",",[230,320,321],{"class":296}," token",[230,323,300],{"class":240},[230,325,326],{"class":244}," process",[230,328,329],{"class":240},".",[230,331,332],{"class":244},"env",[230,334,329],{"class":240},[230,336,337],{"class":244},"GITHUB_TOKEN",[230,339,340],{"class":240},"!",[230,342,343],{"class":240}," },\n",[230,345,347,350],{"class":232,"line":346},5,[230,348,349],{"class":240},"}",[230,351,352],{"class":244},")\n",[230,354,356,358,361,363,366,368,371],{"class":232,"line":355},6,[230,357,275],{"class":274},[230,359,360],{"class":244}," gh ",[230,362,281],{"class":240},[230,364,365],{"class":244}," factory",[230,367,329],{"class":240},[230,369,370],{"class":284},"create",[230,372,373],{"class":244},"()\n",[201,375,376,379,380,382],{},[212,377,378],{},"createForges()"," accepts factories and calls ",[212,381,218],{}," on each one. This lets you describe providers in one place and build them where you need them.",[205,384,386],{"id":385},"the-provider-interface","The provider interface",[201,388,389,390,393,394,393,397,400,401,404,405,393,408,393,411,393,414,393,417,393,420,393,423,393,426,393,429,393,432,393,435,393,438,400,441,444,445,447,448,452],{},"Every provider has the same shape. It has ",[212,391,392],{},"kind",", ",[212,395,396],{},"instance",[212,398,399],{},"baseUrl"," and ",[212,402,403],{},"capabilities",", plus namespaces for the operations: ",[212,406,407],{},"repos",[212,409,410],{},"threads",[212,412,413],{},"notifications",[212,415,416],{},"checks",[212,418,419],{},"ci",[212,421,422],{},"contents",[212,424,425],{},"releases",[212,427,428],{},"webhooks",[212,430,431],{},"search",[212,433,434],{},"securityAlerts",[212,436,437],{},"installations",[212,439,440],{},"users",[212,442,443],{},"sources",". Reviews live on ",[212,446,410],{},". The ",[449,450,451],"a",{"href":141},"provider API reference"," lists them.",[201,454,455,456,461],{},"All namespaces exist on all providers. An operation the forge lacks is present and rejects, so TypeScript doesn't force a cast at each call site. Use ",[449,457,458],{"href":47},[212,459,460],{},"can()"," to decide at run time.",[205,463,465],{"id":464},"escape-hatch","Escape hatch",[201,467,468,471,472,474],{},[212,469,470],{},"provider.request()"," sends a request to an endpoint relative to ",[212,473,399],{},", or to an absolute HTTP(S) URL, with the provider's authentication, user agent, timeout and error mapping. Use it for an endpoint that the model doesn't cover.",[201,476,477],{},"A request to another origin leaves out the provider's credentials and default headers.",[205,479,481],{"id":480},"lite-factories","Lite factories",[201,483,484,485,488,489,329],{},"Every provider except pushin.eu has a second factory, such as ",[212,486,487],{},"githubLite()",". It builds the same provider without webhook ingestion. A browser doesn't receive deliveries, so a Lite bundle leaves out signature verification and payload translation. See ",[449,490,58],{"href":59},[205,492,494],{"id":493},"subpath-exports","Subpath exports",[201,496,497,498,501,502,505],{},"Each provider has its own subpath, such as ",[212,499,500],{},"forges\u002Fgitlab",". The root entry re-exports all of them. The package declares ",[212,503,504],{},"sideEffects: false",", so bundlers can tree-shake the root entry, and a subpath import states the dependency.",[205,507,509],{"id":508},"writing-your-own","Writing your own",[201,511,512,513,516,517,329],{},"A provider is one call to ",[212,514,515],{},"defineForgeProvider()",". See ",[449,518,184],{"href":185},[520,521,522],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}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":226,"searchDepth":264,"depth":264,"links":524},[525,526,527,528,529,530],{"id":207,"depth":264,"text":208},{"id":385,"depth":264,"text":386},{"id":464,"depth":264,"text":465},{"id":480,"depth":264,"text":481},{"id":493,"depth":264,"text":494},{"id":508,"depth":264,"text":509},"How provider functions, factories and Lite variants fit together.","md",null,{"icon":535},"i-lucide-factory",{"title":80,"description":531},"xADUSwNYPoCGkmftx7IPX-35C270JQtNUj8DfYMYS8k",[539,541],{"title":76,"path":77,"stem":78,"description":540,"children":-1},"How a provider declares which operations it supports, and how CI checks those claims.",{"title":84,"path":85,"stem":86,"description":542,"children":-1},"How code forges deliver changes, and how providers turn them into one event type.",1791294008514]