[{"data":1,"prerenderedAt":547},["ShallowReactive",2],{"navigation_docs":3,"-concepts-providers":199,"-concepts-providers-surround":542},[4,23,65,87,133,159,177],{"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,155],{"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},"Environment variables","\u002Freference\u002Fenvironment-variables","5.reference\u002F4.environment-variables",{"title":156,"path":157,"stem":158},"JSON Schemas","\u002Freference\u002Fjson-schemas","5.reference\u002F5.json-schemas",{"title":160,"icon":161,"path":162,"stem":163,"children":164,"page":22},"Examples","i-lucide-boxes","\u002Fexamples","6.examples",[165,169,173],{"title":166,"path":167,"stem":168},"Inbox CLI","\u002Fexamples\u002Finbox-cli","6.examples\u002F1.inbox-cli",{"title":170,"path":171,"stem":172},"Label bot","\u002Fexamples\u002Flabel-bot","6.examples\u002F2.label-bot",{"title":174,"path":175,"stem":176},"Release digest","\u002Fexamples\u002Frelease-digest","6.examples\u002F3.release-digest",{"title":178,"icon":179,"path":180,"stem":181,"children":182,"page":22},"Contributing","i-lucide-git-pull-request","\u002Fcontributing","7.contributing",[183,187,191,195],{"title":184,"path":185,"stem":186},"Contribution guide","\u002Fcontributing\u002Fguidelines","7.contributing\u002F1.guidelines",{"title":188,"path":189,"stem":190},"Write a provider","\u002Fcontributing\u002Fwrite-a-provider","7.contributing\u002F2.write-a-provider",{"title":192,"path":193,"stem":194},"Record fixtures","\u002Fcontributing\u002Frecord-fixtures","7.contributing\u002F3.record-fixtures",{"title":196,"path":197,"stem":198},"Contributors","\u002Fcontributing\u002Fcontributors","7.contributing\u002F4.contributors",{"id":200,"title":80,"body":201,"description":535,"extension":536,"links":537,"meta":538,"navigation":271,"path":81,"seo":540,"stem":82,"__hash__":541},"docs\u002F3.concepts\u002F3.providers.md",{"type":202,"value":203,"toc":527},"minimark",[204,208,213,224,378,387,391,457,466,470,479,482,486,495,499,510,514,523],[205,206,207],"p",{},"This page explains how you create a provider, what every provider contains and how the Lite factories differ.",[209,210,212],"h2",{"id":211},"factories","Factories",[205,214,215,219,220,223],{},[216,217,218],"code",{},"github()"," and the other provider functions return a factory. A factory holds the options and builds the provider when you call ",[216,221,222],{},"create()",". No request goes out until you call a method on the provider.",[225,226,231],"pre",{"className":227,"code":228,"language":229,"meta":230,"style":230},"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","",[216,232,233,266,273,295,348,357],{"__ignoreMap":230},[234,235,238,242,246,250,253,256,259,263],"span",{"class":236,"line":237},"line",1,[234,239,241],{"class":240},"s7zQu","import",[234,243,245],{"class":244},"sMK4o"," {",[234,247,249],{"class":248},"sTEyZ"," github",[234,251,252],{"class":244}," }",[234,254,255],{"class":240}," from",[234,257,258],{"class":244}," '",[234,260,262],{"class":261},"sfazB","forges\u002Fgithub",[234,264,265],{"class":244},"'\n",[234,267,269],{"class":236,"line":268},2,[234,270,272],{"emptyLinePlaceholder":271},true,"\n",[234,274,276,280,283,286,289,292],{"class":236,"line":275},3,[234,277,279],{"class":278},"spNyl","const",[234,281,282],{"class":248}," factory ",[234,284,285],{"class":244},"=",[234,287,249],{"class":288},"s2Zo4",[234,290,291],{"class":248},"(",[234,293,294],{"class":244},"{\n",[234,296,298,302,305,307,310,312,314,317,320,323,326,328,331,334,337,339,342,345],{"class":236,"line":297},4,[234,299,301],{"class":300},"swJcz","  auth",[234,303,304],{"class":244},":",[234,306,245],{"class":244},[234,308,309],{"class":300}," type",[234,311,304],{"class":244},[234,313,258],{"class":244},[234,315,316],{"class":261},"token",[234,318,319],{"class":244},"'",[234,321,322],{"class":244},",",[234,324,325],{"class":300}," token",[234,327,304],{"class":244},[234,329,330],{"class":248}," process",[234,332,333],{"class":244},".",[234,335,336],{"class":248},"env",[234,338,333],{"class":244},[234,340,341],{"class":248},"GITHUB_TOKEN",[234,343,344],{"class":244},"!",[234,346,347],{"class":244}," },\n",[234,349,351,354],{"class":236,"line":350},5,[234,352,353],{"class":244},"}",[234,355,356],{"class":248},")\n",[234,358,360,362,365,367,370,372,375],{"class":236,"line":359},6,[234,361,279],{"class":278},[234,363,364],{"class":248}," gh ",[234,366,285],{"class":244},[234,368,369],{"class":248}," factory",[234,371,333],{"class":244},[234,373,374],{"class":288},"create",[234,376,377],{"class":248},"()\n",[205,379,380,383,384,386],{},[216,381,382],{},"createForges()"," accepts factories and calls ",[216,385,222],{}," on each one. This lets you describe providers in one place and build them where you need them.",[209,388,390],{"id":389},"the-provider-interface","The provider interface",[205,392,393,394,397,398,397,401,404,405,408,409,397,412,397,415,397,418,397,421,397,424,397,427,397,430,397,433,397,436,397,439,397,442,404,445,448,449,451,452,456],{},"Every provider has the same shape. It has ",[216,395,396],{},"kind",", ",[216,399,400],{},"instance",[216,402,403],{},"baseUrl"," and ",[216,406,407],{},"capabilities",", plus namespaces for the operations: ",[216,410,411],{},"repos",[216,413,414],{},"threads",[216,416,417],{},"notifications",[216,419,420],{},"checks",[216,422,423],{},"ci",[216,425,426],{},"contents",[216,428,429],{},"releases",[216,431,432],{},"webhooks",[216,434,435],{},"search",[216,437,438],{},"securityAlerts",[216,440,441],{},"installations",[216,443,444],{},"users",[216,446,447],{},"sources",". Reviews live on ",[216,450,414],{},". The ",[453,454,455],"a",{"href":141},"provider API reference"," lists them.",[205,458,459,460,465],{},"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 ",[453,461,462],{"href":47},[216,463,464],{},"can()"," to decide at run time.",[209,467,469],{"id":468},"escape-hatch","Escape hatch",[205,471,472,475,476,478],{},[216,473,474],{},"provider.request()"," sends a request to an endpoint relative to ",[216,477,403],{},", 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.",[205,480,481],{},"A request to another origin leaves out the provider's credentials and default headers.",[209,483,485],{"id":484},"lite-factories","Lite factories",[205,487,488,489,492,493,333],{},"Every provider except pushin.eu has a second factory, such as ",[216,490,491],{},"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 ",[453,494,58],{"href":59},[209,496,498],{"id":497},"subpath-exports","Subpath exports",[205,500,501,502,505,506,509],{},"Each provider has its own subpath, such as ",[216,503,504],{},"forges\u002Fgitlab",". The root entry re-exports all of them. The package declares ",[216,507,508],{},"sideEffects: false",", so bundlers can tree-shake the root entry, and a subpath import states the dependency.",[209,511,513],{"id":512},"writing-your-own","Writing your own",[205,515,516,517,520,521,333],{},"A provider is one call to ",[216,518,519],{},"defineForgeProvider()",". See ",[453,522,188],{"href":189},[524,525,526],"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":230,"searchDepth":268,"depth":268,"links":528},[529,530,531,532,533,534],{"id":211,"depth":268,"text":212},{"id":389,"depth":268,"text":390},{"id":468,"depth":268,"text":469},{"id":484,"depth":268,"text":485},{"id":497,"depth":268,"text":498},{"id":512,"depth":268,"text":513},"How provider functions, factories and Lite variants fit together.","md",null,{"icon":539},"i-lucide-factory",{"title":80,"description":535},"xADUSwNYPoCGkmftx7IPX-35C270JQtNUj8DfYMYS8k",[543,545],{"title":76,"path":77,"stem":78,"description":544,"children":-1},"How a provider declares which operations it supports, and how CI checks those claims.",{"title":84,"path":85,"stem":86,"description":546,"children":-1},"How code forges deliver changes, and how providers turn them into one event type.",1791296694555]