Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(github): read watched PRs without organization scopes #40747 (GitHub #40740)

OpenSidreyas(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/40740/headopened View on GitHub

Showing 8 changed files with 124 additions and 9 deletions (loading 5).

x
0 of 8 viewed, 8 left
75 additions and 0 deletionspackages/source-control-github/src/server/GitHubPullRequestApi.test.tsModified
View file
@@ -4081,6 +4081,81 @@
+ it.effect("reads PR truth when the credential cannot select Team fields", () =>
+ Effect.gen(function* () {
+ mockedExecute.mockImplementation((call) => {
+ if (call.kind !== "graphql") return Effect.die("Unexpected REST request");
+ return Effect.succeed(
+ output(
+ encodeJson(
+ call.variables?.["teamDetails"] === false
+ ? coreResponse({
+ reviewDecision: "CHANGES_REQUESTED",
+ commits: {
+ nodes: [
+ {
+ commit: {
+ statusCheckRollup: {
+ contexts: {
+ nodes: [checkRun({ name: "test", conclusion: "FAILURE" })],
+ pageInfo: lastPage,
+ },
+ },
+ },
+ },
+ ],
+ },
+ reviewRequests: {
+ nodes: [