authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:05:07-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:05:07-07:00
log32142cff186c607c8cae644927cee8d6c9cba757
treedad9ea22f6338b0d1e4b895adf9fc4f0456b1e4a
parentdfc70a3294641a2acb021766a759ac4c79665944
signature Signed by PGP key B5690EEEBB952194

test(server): remove Azure permissions constant snapshot (#9973)


2 files changed, 1 insertions(+), 30 deletions(-)

apps/server/src/pullRequest/AzureDevOpsPullRequestProvider.test.ts deleted-29
......@@ -1,29 +0,0 @@
1import { describe, expect, it } from "vite-plus/test";
2
3import { AZURE_DEVOPS_VIEWER_PERMISSIONS } from "./AzureDevOpsPullRequestProvider.ts";
4
5describe("azure devops viewer permissions", () => {
6 it("offers every action to whoever is signed in, because Azure names no permission", () => {
7 // The same answer for a viewer who can write, one who can only read, and an author with read
8 // access: `az repos pr show` and `az repos pr list` carry nothing about the caller's standing,
9 // and an unknown permission is granted rather than guessed away. Azure refuses the ones it
10 // will not allow, at the moment they are taken, in words this could not have written.
11 expect(AZURE_DEVOPS_VIEWER_PERMISSIONS).toEqual({
12 actions: [
13 "merge",
14 "ready",
15 "draft",
16 "close",
17 "reopen",
18 "enable-auto-merge",
19 "disable-auto-merge",
20 ],
21 // False because the host itself cannot post one, not because this viewer may not.
22 comment: false,
23 resolve: false,
24 verdicts: [],
25 // True because `az repos pr reviewer` does take one, and Azure says nothing about who may.
26 requestReviewers: true,
27 });
28 });
29});
apps/server/src/pullRequest/AzureDevOpsPullRequestProvider.ts+1-1
......@@ -56,7 +56,7 @@ const CAPABILITIES: PullRequestCapabilities = {
5656 * they try. That is the safer half of an unknown: hiding a control from someone entitled to it
5757 * leaves them no way through and no reason given.
5858 */
59export const AZURE_DEVOPS_VIEWER_PERMISSIONS: PullRequestViewerPermissions = {
59const AZURE_DEVOPS_VIEWER_PERMISSIONS: PullRequestViewerPermissions = {
6060 actions: CAPABILITIES.actions,
6161 comment: CAPABILITIES.comment,
6262 resolve: CAPABILITIES.review.resolve,