[{"data":1,"prerenderedAt":782},["ShallowReactive",2],{"navigation_docs":3,"-platforms-azure-devops":96,"-platforms-azure-devops-surround":777},[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":95},"Platforms","\u002Fplatforms","2.platforms\u002F0.index",[61,63,67,71,75,79,83,87,91],{"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},"GitBucket","\u002Fplatforms\u002Fgitbucket","2.platforms\u002F07.gitbucket",{"title":92,"path":93,"stem":94},"Artifacts","\u002Fplatforms\u002Fartifacts","2.platforms\u002F08.artifacts","i-lucide-library",{"id":97,"title":84,"body":98,"description":769,"extension":770,"links":771,"meta":772,"navigation":148,"path":85,"seo":774,"stem":86,"__hash__":776},"docs\u002F2.platforms\u002F06.azure-devops.md",{"type":99,"value":100,"toc":759},"minimark",[101,105,110,262,282,289,307,310,323,334,339,354,365,382,393,397,411,558,562,657,661,668,707,711,721,724,727,734,737,741,755],[102,103],"platform-facts",{"platform":104},"azure-devops",[106,107,109],"h2",{"id":108},"address-an-azure-devops-project","Address an Azure DevOps project",[111,112,117],"pre",{"className":113,"code":114,"language":115,"meta":116,"style":116},"language-ts shiki shiki-themes forges forges forges","import { createProvider } from \"@agntn\u002Fforges\";\n\nconst azure = await createProvider(\"azure-devops\", { token: process.env.AZURE_DEVOPS_EXT_PAT });\n\nconst wiki = { owner: \"dnceng-public\u002Fpublic\", repo: \"dotnet-public-wiki\" };\nconst pull = await azure.pullRequests.get({ ...wiki, number: 5 });\nconst home = await azure.repos.readContents(wiki, { path: \"Home.md\" });\n","ts","",[118,119,120,143,150,178,183,208,235],"code",{"__ignoreMap":116},[121,122,125,129,133,136,140],"span",{"class":123,"line":124},"line",1,[121,126,128],{"class":127},"skH_V","import",[121,130,132],{"class":131},"s38Sx"," { createProvider } ",[121,134,135],{"class":127},"from",[121,137,139],{"class":138},"shU9J"," \"@agntn\u002Fforges\"",[121,141,142],{"class":131},";\n",[121,144,146],{"class":123,"line":145},2,[121,147,149],{"emptyLinePlaceholder":148},true,"\n",[121,151,153,156,159,162,165,169,172,175],{"class":123,"line":152},3,[121,154,155],{"class":127},"const",[121,157,158],{"class":131}," azure ",[121,160,161],{"class":127},"=",[121,163,164],{"class":127}," await",[121,166,168],{"class":167},"sK71F"," createProvider",[121,170,171],{"class":131},"(",[121,173,174],{"class":138},"\"azure-devops\"",[121,176,177],{"class":131},", { token: process.env.AZURE_DEVOPS_EXT_PAT });\n",[121,179,181],{"class":123,"line":180},4,[121,182,149],{"emptyLinePlaceholder":148},[121,184,186,188,191,193,196,199,202,205],{"class":123,"line":185},5,[121,187,155],{"class":127},[121,189,190],{"class":131}," wiki ",[121,192,161],{"class":127},[121,194,195],{"class":131}," { owner: ",[121,197,198],{"class":138},"\"dnceng-public\u002Fpublic\"",[121,200,201],{"class":131},", repo: ",[121,203,204],{"class":138},"\"dotnet-public-wiki\"",[121,206,207],{"class":131}," };\n",[121,209,211,213,216,218,220,223,226,229,232],{"class":123,"line":210},6,[121,212,155],{"class":127},[121,214,215],{"class":131}," pull ",[121,217,161],{"class":127},[121,219,164],{"class":127},[121,221,222],{"class":131}," azure.pullRequests.",[121,224,225],{"class":167},"get",[121,227,228],{"class":131},"({ ",[121,230,231],{"class":127},"...",[121,233,234],{"class":131},"wiki, number: 5 });\n",[121,236,238,240,243,245,247,250,253,256,259],{"class":123,"line":237},7,[121,239,155],{"class":127},[121,241,242],{"class":131}," home ",[121,244,161],{"class":127},[121,246,164],{"class":127},[121,248,249],{"class":131}," azure.repos.",[121,251,252],{"class":167},"readContents",[121,254,255],{"class":131},"(wiki, { path: ",[121,257,258],{"class":138},"\"Home.md\"",[121,260,261],{"class":131}," });\n",[263,264,265,266,269,270,273,274,277,278,281],"p",{},"A repository lives in a project inside an organization. Set ",[118,267,268],{},"owner"," to ",[118,271,272],{},"organization\u002Fproject",". The repository's ",[118,275,276],{},"fullName"," includes all three parts: ",[118,279,280],{},"dnceng-public\u002Fpublic\u002Fdotnet-public-wiki",".",[263,283,284,285,288],{},"Each owner part must be one path segment. Empty parts, ",[118,286,287],{},".."," and a third segment get a 400 before any request.",[263,290,291,292,269,295,298,299,302,303,306],{},"A bare project also works when forges knows the organization. Set ",[118,293,294],{},"baseURL",[118,296,297],{},"https:\u002F\u002Fdev.azure.com\u002Facme"," or ",[118,300,301],{},"https:\u002F\u002Facme.visualstudio.com",". The MCP server and extensions also accept ",[118,304,305],{},"FORGES_AZURE_DEVOPS_BASE_URL",". Otherwise, the credential chain can find the default organization.",[263,308,309],{},"Without an organization, a bare project gets a 400 before any request. The error names those three ways to supply it.",[263,311,312,313,316,317,320,321,281],{},"MCP, Pi and OMP tools also accept ",[118,314,315],{},"repo"," as ",[118,318,319],{},"organization\u002Fproject\u002Fname",". Other platforms still reject two slashes in ",[118,322,315],{},[263,324,325,326,329,330,333],{},"This provider supports Azure DevOps Services, including the old ",[118,327,328],{},"visualstudio.com"," hosts. It refuses Azure DevOps Server URLs, such as ",[118,331,332],{},"https:\u002F\u002Ftfs.example.com\u002Ftfs",", with a 400.",[335,336,338],"h3",{"id":337},"where-does-the-token-come-from","Where does the token come from?",[263,340,341,342,345,346,349,350,353],{},"The chain checks an explicit ",[118,343,344],{},"{ token }"," first. Then it checks ",[118,347,348],{},"AZURE_DEVOPS_EXT_PAT",", which the ",[118,351,352],{},"az devops"," extension also reads.",[263,355,356,357,360,361,364],{},"Finally, it checks the PAT file saved by ",[118,358,359],{},"az devops login",". That's ",[118,362,363],{},"~\u002F.azure\u002Fazuredevops\u002FpersonalAccessTokens"," on Linux. The keyring isn't checked.",[263,366,367,368,370,371,374,375,378,379,381],{},"The organization comes from ",[118,369,294],{}," first. Next comes ",[118,372,373],{},"AZURE_DEVOPS_EXT__DEFAULTS_ORGANIZATION",", then ",[118,376,377],{},"[defaults] organization"," in the ",[118,380,352],{}," config.",[263,383,384,385,388,389,392],{},"The PAT goes as Basic auth with an empty username. Pass ",[118,386,387],{},"{ token: \"\" }"," to read public projects anonymously. Public projects are rare, but ",[118,390,391],{},"dnceng-public\u002Fpublic"," is one.",[106,394,396],{"id":395},"what-it-reads","What it reads",[263,398,399,400,403,404,407,408,281],{},"Endpoints are relative to ",[118,401,402],{},"https:\u002F\u002Fdev.azure.com\u002F:organization\u002F:project\u002F_apis",". In this table, ",[118,405,406],{},"…"," means ",[118,409,410],{},"\u002Fgit\u002Frepositories\u002F:repo",[412,413,414,427],"table",{},[415,416,417],"thead",{},[418,419,420,424],"tr",{},[421,422,423],"th",{},"Resource",[421,425,426],{},"Endpoint",[428,429,430,448,463,480,494,517,529,542],"tbody",{},[418,431,432,436],{},[433,434,435],"td",{},"Repositories and tags",[433,437,438,441,442,441,445],{},[118,439,440],{},"GET \u002Fgit\u002Frepositories",", ",[118,443,444],{},"GET …",[118,446,447],{},"GET …\u002Frefs?filter=tags\u002F",[418,449,450,452],{},[433,451,24],{},[433,453,454,441,457,441,460],{},[118,455,456],{},"GET …\u002Fpullrequests",[118,458,459],{},"GET …\u002FpullRequests\u002F:id",[118,461,462],{},"POST …\u002Fpullrequests",[418,464,465,468],{},[433,466,467],{},"Comments and timeline",[433,469,470,441,473,476,477],{},[118,471,472],{},"GET …\u002FpullRequests\u002F:id\u002Fthreads",[118,474,475],{},"PATCH"," and ",[118,478,479],{},"DELETE …\u002Fthreads\u002F:id\u002Fcomments\u002F:id",[418,481,482,484],{},[433,483,28],{},[433,485,486,441,488,441,491],{},[118,487,472],{},[118,489,490],{},"POST …\u002Fthreads\u002F:id\u002Fcomments",[118,492,493],{},"PATCH …\u002Fthreads\u002F:id",[418,495,496,499],{},[433,497,498],{},"Commits and checks",[433,500,501,504,505,476,508,441,511,441,514],{},[118,502,503],{},"GET …\u002Fcommits"," with ",[118,506,507],{},"$top",[118,509,510],{},"$skip",[118,512,513],{},"GET …\u002Fcommits\u002F:sha",[118,515,516],{},"GET …\u002Fcommits\u002F:sha\u002Fstatuses",[418,518,519,522],{},[433,520,521],{},"Commit comparison",[433,523,524,441,527],{},[118,525,526],{},"GET …\u002Fdiffs\u002Fcommits",[118,528,503],{},[418,530,531,534],{},[433,532,533],{},"Repository contents",[433,535,536,441,539],{},[118,537,538],{},"GET …\u002Fitems",[118,540,541],{},"GET …\u002Fblobs\u002F:id",[418,543,544,547],{},[433,545,546],{},"Issues (work items)",[433,548,549,441,552,441,555],{},[118,550,551],{},"POST \u002Fwit\u002Fwiql",[118,553,554],{},"POST \u002Fwit\u002Fworkitemsbatch",[118,556,557],{},"GET \u002Fwit\u002Fworkitems\u002F:id",[106,559,561],{"id":560},"what-comes-back","What comes back",[563,564,565,569,572,579,585,599,609,612,628,642,648,651],"ul",{},[566,567,568],"li",{},"Issues are project work items. Their numbers span the project, not each repository.",[566,570,571],{},"Pull requests include conversation comments, events and checks. Checks combine commit statuses and policy evaluations when you have a token.",[566,573,574,575,578],{},"Conversation comment IDs look like ",[118,576,577],{},"12\u002F1",". Comment numbers restart at 1 in each thread.",[566,580,581,582,281],{},"Review threads have a file path. Conversation threads stay in ",[118,583,584],{},"pullRequests.listComments",[566,586,587,588,298,591,594,595,598],{},"A review thread is resolved unless its status is ",[118,589,590],{},"active",[118,592,593],{},"pending",". ",[118,596,597],{},"isOutdated"," is always false.",[566,600,601,602,605,606,608],{},"Resolving sets ",[118,603,604],{},"fixed",", matching the web UI's Resolve button. Unresolving sets ",[118,607,590],{},". Resolving an already resolved thread changes nothing.",[566,610,611],{},"A thread reply answers its first comment.",[566,613,614,615,441,618,441,621,476,624,627],{},"Commit pages have no total. forges asks for one extra row to find the next page. Filters for ",[118,616,617],{},"since",[118,619,620],{},"until",[118,622,623],{},"path",[118,625,626],{},"ref"," work.",[566,629,630,631,634,635,638,639,281],{},"Comparisons return changed files and up to 1000 commits, oldest first. ",[118,632,633],{},"filesComplete"," is ",[118,636,637],{},"true"," once Azure DevOps says ",[118,640,641],{},"allChangesIncluded",[566,643,644,645,281],{},"Contents resolve the ref to a commit first. Directory listings are one level deep, with ",[118,646,647],{},"size: null",[566,649,650],{},"File size comes from the blob before its bytes. Files over 1 MiB get a 413 without downloading their contents.",[566,652,653,654,281],{},"Tags are peeled refs under ",[118,655,656],{},"tags\u002F",[106,658,660],{"id":659},"gotchas","Gotchas",[263,662,663,664,667],{},"Why does ",[118,665,666],{},"v1.0"," resolve to nothing?",[563,669,670,677,680,683,694,704],{},[566,671,672,673,676],{},"A bare tag name is read as a branch. Use ",[118,674,675],{},"refs\u002Ftags\u002Fv1.0"," instead. A 40-hex SHA is read as a commit.",[566,678,679],{},"Anonymous issue lists get a 501. Azure DevOps only runs work item queries for someone logged in.",[566,681,682],{},"A missing work item and an unreadable one both return 404. That answer doesn't tell you which case you hit.",[566,684,685,686,689,690,693],{},"A bad token on a private organization would normally bounce to Microsoft's login page. forges sends ",[118,687,688],{},"X-TFS-FedAuthRedirect: Suppress",", so it gets an ",[118,691,692],{},"AuthenticationError"," with 401 instead.",[566,695,696,699,700,703],{},[118,697,698],{},"issues.create"," makes a work item of type ",[118,701,702],{},"Issue",". A Scrum project has no such type, so Azure DevOps refuses it.",[566,705,706],{},"The docs explorer at forges.agntn.dev doesn't run Azure DevOps. It needs a token, and public projects are rare.",[106,708,710],{"id":709},"what-isnt-there","What isn't there",[263,712,713,714,298,717,720],{},"Releases aren't available because Azure DevOps has none. Pipelines don't map to ",[118,715,716],{},"ciRuns.list",[118,718,719],{},"ciJobs"," yet. Read commit or pull request checks instead.",[263,722,723],{},"User lookup and authenticated user lookup aren't wired here. Neither are code search, templates, reactions, issue fields or sub issues.",[263,725,726],{},"Some gaps are ours, not Azure DevOps'. Posting a new conversation comment, editing an issue or pull request, merging, reviews and patches aren't wired up yet. Editing and deleting a comment work.",[263,728,729,730,733],{},"Each returns a ",[118,731,732],{},"ForgesError"," with a 501 and a sentence. When the provider knows upfront, it returns that error before any request.",[263,735,736],{},"Work item numbers count across the whole project, so issue 7 might live next to a repository it has never met.",[106,738,740],{"id":739},"where-it-lives","Where it lives",[263,742,743,744,747,748,751,752,281],{},"The provider lives in ",[118,745,746],{},"src\u002Fproviders\u002Fazure-devops.ts",". It uses the ",[118,749,750],{},"forges\u002Fazure-devops"," adapter and tokens from ",[118,753,754],{},"@agntn\u002Fcredentials\u002Fazure-devops",[756,757,758],"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":116,"searchDepth":145,"depth":145,"links":760},[761,764,765,766,767,768],{"id":108,"depth":145,"text":109,"children":762},[763],{"id":337,"depth":152,"text":338},{"id":395,"depth":145,"text":396},{"id":560,"depth":145,"text":561},{"id":659,"depth":145,"text":660},{"id":709,"depth":145,"text":710},{"id":739,"depth":145,"text":740},"Azure DevOps repositories, pull requests and work items in the same shapes as every other forge. The owner is organization\u002Fproject.","md",null,{"icon":773},"i-simple-icons-azuredevops",{"title":775,"description":769},"Read Azure DevOps pull requests, work items and files with forges","ZHylinB4hyeF70d8O99QReL1uFJtMCrCHqTUKvRVqrY",[778,780],{"title":80,"path":81,"stem":82,"description":779,"children":-1},"Gitee repositories, issues and pull requests in the same shapes as every other forge. Issues keep their text keys.",{"title":88,"path":89,"stem":90,"description":781,"children":-1},"The GitHub provider pointed at a GitBucket \u002Fapi\u002Fv3. What GitBucket does not serve fails with a sentence, not a 404.",1794778614639]