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:
@@ -22,7 +22,7 @@ const conclusionMap: Record<string, PRCheckDetail['conclusion']> = {
|
||||
timed_out: 'timed_out',
|
||||
skipped: 'skipped',
|
||||
neutral: 'neutral',
|
||||
action_required: 'failure',
|
||||
action_required: 'action_required',
|
||||
stale: 'failure',
|
||||
startup_failure: 'failure'
|
||||
}
|
||||
@@ -61,7 +61,10 @@ export function mapCheckConclusion(state: string): PRCheckDetail['conclusion'] {
|
||||
if (s === 'FAILURE' || s === 'FAIL') {
|
||||
return 'failure'
|
||||
}
|
||||
if (s === 'ACTION_REQUIRED' || s === 'STALE' || s === 'STARTUP_FAILURE') {
|
||||
if (s === 'ACTION_REQUIRED') {
|
||||
return 'action_required'
|
||||
}
|
||||
if (s === 'STALE' || s === 'STARTUP_FAILURE') {
|
||||
return 'failure'
|
||||
}
|
||||
if (s === 'CANCELLED') {
|
||||
@@ -134,6 +137,9 @@ export function deriveCheckStatus(rollup: unknown[] | null | undefined): CheckSt
|
||||
conclusion === 'FAILURE' ||
|
||||
conclusion === 'TIMED_OUT' ||
|
||||
conclusion === 'CANCELLED' ||
|
||||
// Why: action_required (e.g. an unapproved workflow run) blocks merge until
|
||||
// someone acts; treat it as needs-attention rather than a silent pass.
|
||||
conclusion === 'ACTION_REQUIRED' ||
|
||||
state === 'FAILURE' ||
|
||||
state === 'ERROR'
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user