Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: multi-provider pull requests page with in-app reviews #4849

MergedBil0000(GitHub profile, opens in a new tab)merged 223 commits intomain fromrefs/pull/4849/headmerged by juliusmarminge View on GitHub

Showing 143 changed files with 30 additions and 0 deletions (loading 139).

x
0 of 143 viewed, 143 left
11 additions and 0 deletionsapps/server/src/auth/RpcAuthorization.test.tsModified
View file
@@ -37,6 +37,17 @@
expect(requiredScopeForRpcMethod(WS_METHODS.cloudInstallRelayClient)).toBe(AuthRelayWriteScope);
});
​
+ it("reads the reviewer menu under the same scope as the pull request it belongs to", () => {
+ // The candidate list is a read like the detail beside it, and asking somebody for a review is
+ // a write like every other pull request operation.
+ expect(requiredScopeForRpcMethod(WS_METHODS.pullRequestsReviewerCandidates)).toBe(
+ requiredScopeForRpcMethod(WS_METHODS.pullRequestsDetail),
+ );
+ expect(requiredScopeForRpcMethod(WS_METHODS.pullRequestsRequestReviewers)).toBe(
+ requiredScopeForRpcMethod(WS_METHODS.pullRequestsComment),
+ );
+ });
+​
it("rejects unknown RPC method names", () => {
for (const method of ["server.notRegistered", "toString", "constructor"]) {
expect(() => requiredScopeForRpcMethod(method)).toThrow(
17 additions and 0 deletionsapps/server/src/auth/RpcAuthorization.tsModified
View file
@@ -52,6 +52,23 @@
[WS_METHODS.serverGetBackgroundPolicy]: AuthOrchestrationReadScope,
[WS_METHODS.cloudGetRelayClientStatus]: AuthRelayReadScope,
[WS_METHODS.cloudInstallRelayClient]: AuthRelayWriteScope,
+ [WS_METHODS.pullRequestsList]: AuthOrchestrationReadScope,
+ [WS_METHODS.pullRequestsListStats]: AuthOrchestrationReadScope,
+ [WS_METHODS.pullRequestsDetail]: AuthOrchestrationReadScope,
+ [WS_METHODS.pullRequestsActivity]: AuthOrchestrationReadScope,