Skip to content

Try fix "awaiting approval" issue#8835

Merged
alexr00 merged 1 commit into
mainfrom
alexr00/steep-puffin
Jul 9, 2026
Merged

Try fix "awaiting approval" issue#8835
alexr00 merged 1 commit into
mainfrom
alexr00/steep-puffin

Conversation

@alexr00

@alexr00 alexr00 commented Jul 9, 2026

Copy link
Copy Markdown
Member

See #8813

Copilot AI review requested due to automatic review settings July 9, 2026 14:59
@alexr00 alexr00 enabled auto-merge (squash) July 9, 2026 14:59
@alexr00 alexr00 self-assigned this Jul 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to address cases where GitHub Actions workflow runs are “awaiting approval” (common for fork PRs) and therefore don’t emit check runs yet, causing the extension to treat the PR as having no checks and potentially show an overly-optimistic overall status.

Changes:

  • Extend the status-check GraphQL queries to also fetch checkSuites data for the latest commit.
  • Add logic in GitHubRepository.getStatusChecks() to synthesize pending check statuses from “awaiting approval” check suites and recompute the overall check state.
  • Add unit tests covering the new “awaiting approval” status synthesis behavior.
Show a summary per file
File Description
src/test/github/githubRepository.test.ts Adds tests for synthesizing pending statuses from “awaiting approval” check suites.
src/github/queriesShared.gql Fetches checkSuites in the checks queries to detect workflows awaiting approval.
src/github/graphql.ts Introduces CheckSuiteForRollup and wires it into GetChecksResponse.
src/github/githubRepository.ts Synthesizes pending statuses from check suites awaiting approval and recalculates overall check state.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment on lines +1199 to +1210
checkSuites(first: 100) {
nodes {
status
conclusion
workflowRun {
event
workflow {
name
}
}
}
}
Comment on lines +2148 to +2163
const existingWorkflowNames = new Set(
existingStatuses.map(status => status.workflowName).filter((name): name is string => !!name),
);

const awaitingApproval: PullRequestCheckStatus[] = [];
for (const suite of checkSuites) {
// A suite that is waiting or has only been requested and hasn't concluded is
// awaiting approval before it can run.
if (suite.conclusion !== null || (suite.status !== 'WAITING' && suite.status !== 'REQUESTED')) {
continue;
}

const workflowName = suite.workflowRun?.workflow.name;
if (workflowName && existingWorkflowNames.has(workflowName)) {
continue;
}
@alexr00 alexr00 merged commit ffee0c1 into main Jul 9, 2026
8 checks passed
@alexr00 alexr00 deleted the alexr00/steep-puffin branch July 9, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants