Skip to content

Commit

Permalink
warmup: fix Azure Pipelines API URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ManasJayanth committed Feb 29, 2024
1 parent 8f70e36 commit 21fb91d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions npm-cli/src/AzurePipelines.re
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ let getDefinitionID = (projName, github) => {
let proj = projName |> ProjectName.toString;
let definition = Js.String.replace("/", ".", github);
Https.getCompleteResponse(
{j|$restBase/$proj/_apis/build/definitions?name=$definition&api-version=4.1|j},
{j|$restBase/$proj/_apis/build/definitions?project=$definition&api-version=7.0|j},
)
|> P.then_(r =>
P.resolve(
Expand All @@ -149,7 +149,7 @@ let getDefinitionID = (projName, github) => {
let getBuildID = (projName, definitionID) => {
let proj = projName |> ProjectName.toString;
Https.getCompleteResponse(
{j|$restBase/$proj/_apis/build/builds?$filter&$master&$latest&definitions=$definitionID&api-version=4.1|j},
{j|$restBase/$proj/_apis/build/builds?$filter&$master&$latest&definitions=$definitionID&api-version=7.0|j},
)
|> P.then_(r =>
P.resolve(
Expand All @@ -170,7 +170,7 @@ let getDownloadURL = (projName, latestBuildID) => {
switch (artifact) {
| Some({filename}) =>
Https.getCompleteResponse(
{j|$restBase/$proj/_apis/build/builds/$latestBuildID/artifacts?artifactname=$filename&api-version=4.1|j},
{j|$restBase/$proj/_apis/build/builds/$latestBuildID/artifacts?artifactname=$filename&api-version=7.0|j},
)
|> P.then_(
fun
Expand All @@ -191,7 +191,7 @@ let getChecksumDownloadURL = (projName, latestBuildID) => {
switch (artifact) {
| Some({checksumFilename}) =>
Https.getCompleteResponse(
{j|$restBase/$proj/_apis/build/builds/$latestBuildID/artifacts?artifactname=$checksumFilename&api-version=4.1|j},
{j|$restBase/$proj/_apis/build/builds/$latestBuildID/artifacts?artifactname=$checksumFilename&api-version=7.0|j},
)
|> P.then_(
fun
Expand Down

0 comments on commit 21fb91d

Please sign in to comment.