Skip to content

Commit

Permalink
Use api-version 4.1 so it works with older Azure DevOps Server instan…
Browse files Browse the repository at this point in the history
…ces as well (#30)

Signed-off-by: Alexander <[email protected]>
  • Loading branch information
ajeckmans authored Nov 10, 2023
1 parent e8e9e96 commit 0916dee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/format-check/scripts/services/pull-request-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class PullRequestService {

var url = `${this.settings.Environment.orgUrl}${this.settings.Environment.projectId}/` +
`_apis/git/repositories/${this.settings.Environment.repoId}/diffs/commits` +
`?api-version=7.1&baseVersion=${targetRefName}&targetVersion=${sourceRefName}` +
`?api-version=4.1&baseVersion=${targetRefName}&targetVersion=${sourceRefName}` +
`&targetVersionType=branch&baseVersionType=branch&diffCommonCommit=false`;
console.log(`Fetching ${url}`);
const response = await fetch(url, {
Expand Down Expand Up @@ -236,4 +236,4 @@ export class PullRequestService {
*/
export async function getPullRequestService(settings: Settings): Promise<PullRequestService> {
return new PullRequestService(await BaseGitApiService.getGitApi(), settings);
}
}

0 comments on commit 0916dee

Please sign in to comment.