Skip to content

Commit 9bbeecb

Browse files
Updates statusCheckRollup field to enterprise-friendly version
1 parent 7befb4b commit 9bbeecb

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

src/plus/integrations/providers/github/github.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,14 @@ reviewRequests(first: 10) {
156156
}
157157
}
158158
}
159-
statusCheckRollup {
160-
state
159+
commits(last: 1) {
160+
nodes {
161+
commit {
162+
statusCheckRollup {
163+
state
164+
}
165+
}
166+
}
161167
}
162168
totalCommentsCount
163169
viewerCanUpdate

src/plus/integrations/providers/github/models.ts

+10-4
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,15 @@ export interface GitHubPullRequest extends GitHubPullRequestLite {
165165
requestedReviewer: GitHubMember | null;
166166
}[];
167167
};
168-
statusCheckRollup: {
169-
state: 'SUCCESS' | 'FAILURE' | 'PENDING' | 'EXPECTED' | 'ERROR';
170-
} | null;
168+
commits: {
169+
nodes: {
170+
commit: {
171+
statusCheckRollup: {
172+
state: 'SUCCESS' | 'FAILURE' | 'PENDING' | 'EXPECTED' | 'ERROR';
173+
} | null;
174+
};
175+
}[];
176+
};
171177
totalCommentsCount: number;
172178
viewerCanUpdate: boolean;
173179
}
@@ -393,7 +399,7 @@ export function fromGitHubPullRequest(pr: GitHubPullRequest, provider: Provider)
393399
avatarUrl: r.avatarUrl,
394400
url: r.url,
395401
})),
396-
fromGitHubPullRequestStatusCheckRollupState(pr.statusCheckRollup?.state),
402+
fromGitHubPullRequestStatusCheckRollupState(pr.commits.nodes?.[0]?.commit.statusCheckRollup?.state),
397403
);
398404
}
399405

0 commit comments

Comments
 (0)