Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions apps/server/src/pullRequest/AzureDevOpsPullRequestCli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,10 +543,18 @@ layer("AzureDevOpsPullRequestCli.layer", (it) => {
});

assert.strictEqual(comments.length, 1);
expect(argsOfCall(0)).toContain("rest");
expect(argsOfCall(0)).toContain(
expect(argsOfCall(0)).toEqual([
"rest",
"--method",
"get",
"--url",
"https://dev.azure.com/acme/platform/_apis/git/r/web/pullRequests/42/threads?api-version=7.1",
);
"--resource",
"499b84ac-1321-427f-aa17-267ca6975798",
"--only-show-errors",
"--output",
"json",
]);
}),
);

Expand Down
3 changes: 3 additions & 0 deletions apps/server/src/pullRequest/AzureDevOpsPullRequestCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export type AzureDevOpsPullRequestCliError =

/** The version every REST call below is pinned to, so a new default cannot reshape a response. */
const REST_API_VERSION = "7.1";
const AZURE_DEVOPS_RESOURCE_ID = "499b84ac-1321-427f-aa17-267ca6975798";
const PULL_REQUEST_LIST_MAX_OUTPUT_BYTES = 16 * 1024 * 1024;

export class AzureDevOpsPullRequestCli extends Context.Service<
Expand Down Expand Up @@ -455,6 +456,8 @@ export const make = Effect.gen(function* () {
"get",
"--url",
`${input.threadsUrl}?api-version=${REST_API_VERSION}`,
"--resource",
AZURE_DEVOPS_RESOURCE_ID,
],
}).pipe(
Effect.flatMap((result) => {
Expand Down
Loading