Surface GitHub check suites awaiting approval (#6717)
* Surface GitHub check suites awaiting approval to unblock merge - Query the check-suites API endpoint to find suites with an "action_required" conclusion, which are often workflows awaiting "Approve and run" and do not have any associated check runs. - Map the "action_required" status distinctly instead of treating it as a standard failure or omitting it entirely. - Update the UI to render these suites with a warning icon, a dedicated "Action required" label, and a localized hint explaining that manual approval is required on GitHub. - Count "action_required" checks as failed/blocking when deriving overall PR and task statuses so the UI does not report all checks passing. * Enhance visibility and handling of action-required PR check suites * Include check suite IDs in pending approval check names and URLs to allow navigating directly to the specific workflow run. * Add an "action required" count badge to PR dialog and page checks tabs. * Prioritize action-required checks in the checks preview summary. * Use correct check run state for the action-required fallback hint in the right sidebar details panel. * Add translations for the new status across all supported locales.
This commit is contained in:
@@ -91,6 +91,17 @@ describe('hostedReviewSummaryFromGitHubPRInfo', () => {
|
||||
expect(summary.checksStatus).toBe('failure')
|
||||
})
|
||||
|
||||
it('treats action_required checks as failed so auto-merge sees the block', () => {
|
||||
const summary = hostedReviewSummaryFromGitHubPRInfo({
|
||||
pr: { ...pr, checksStatus: 'success' },
|
||||
owner: 'acme',
|
||||
repo: 'orca',
|
||||
checks: [{ name: 'approval', status: 'completed', conclusion: 'action_required', url: null }]
|
||||
})
|
||||
|
||||
expect(summary.checksStatus).toBe('failure')
|
||||
})
|
||||
|
||||
it('distinguishes loaded empty comments from unknown comments', () => {
|
||||
expect(
|
||||
hostedReviewSummaryFromGitHubPRInfo({
|
||||
|
||||
@@ -39,7 +39,10 @@ function deriveChecksStatus(
|
||||
(check) =>
|
||||
check.conclusion === 'failure' ||
|
||||
check.conclusion === 'timed_out' ||
|
||||
check.conclusion === 'cancelled'
|
||||
check.conclusion === 'cancelled' ||
|
||||
// Why: action_required (e.g. a workflow awaiting approval) blocks merge;
|
||||
// treat it as failure so the review queue doesn't report a clean PR.
|
||||
check.conclusion === 'action_required'
|
||||
)
|
||||
if (hasFailure) {
|
||||
return 'failure'
|
||||
|
||||
@@ -1231,6 +1231,10 @@ export type PRCheckDetail = {
|
||||
| 'neutral'
|
||||
| 'skipped'
|
||||
| 'pending'
|
||||
// Why: a check suite needing manual action (e.g. a workflow awaiting "Approve
|
||||
// and run") has no check run and is absent from statusCheckRollup, yet blocks
|
||||
// auto-merge (GitHub returns "unstable status"). Surface it as its own state.
|
||||
| 'action_required'
|
||||
| null
|
||||
url: string | null
|
||||
checkRunId?: number
|
||||
|
||||
Reference in New Issue
Block a user