Skip to content

feat(prs): show workflows awaiting approval in Checks tab and add V keybinding to approve them#767

Merged
dlvhdr merged 5 commits intodlvhdr:mainfrom
sideshowbarker:checks-awaiting-approval
Feb 18, 2026
Merged

feat(prs): show workflows awaiting approval in Checks tab and add V keybinding to approve them#767
dlvhdr merged 5 commits intodlvhdr:mainfrom
sideshowbarker:checks-awaiting-approval

Conversation

@sideshowbarker
Copy link
Contributor

@sideshowbarker sideshowbarker commented Feb 9, 2026

Summary

  • Add support for displaying "workflows awaiting approval" in the PR Checks tab — these are workflows that require manual approval before running (e.g., first-time contributor PRs)
  • Show pending check suites (QUEUED/PENDING/WAITING status) in a dedicated "Pending" section
  • Display required status checks from branch protection rules that haven't reported yet
  • Add V keybinding to approve all workflows awaiting approval for the selected PR, with confirmation prompt and clear error messaging for non-approvable workflows
image

Test plan

  • View a PR from a first-time contributor that has workflows awaiting approval
  • Verify the overview box shows "X awaiting approval" with the shield icon
  • Verify the checks bar includes an orange/warning segment for awaiting approval
  • Verify the "All Checks" section shows an "Awaiting Approval" header with workflow names
  • View a PR with pending/queued check suites and verify they appear under "Pending"
  • Press V on a PR with workflows awaiting approval, confirm with y, verify workflows get approved
  • Press V on a PR where workflows aren't approvable (non-fork), verify clear error message
  • Verify V keybinding appears in help (?) under PR actions as "approve all workflows"
  • Run go test ./... — all tests pass

@sideshowbarker sideshowbarker changed the title feat(prs): show workflows awaiting approval in Checks tab feat(prs): show workflows awaiting approval in Checks tab and add V keybinding to approve them Feb 11, 2026
@sideshowbarker sideshowbarker force-pushed the checks-awaiting-approval branch 3 times, most recently from f9734bd to 2f3013d Compare February 11, 2026 01:42
Query checkSuites in addition to statusCheckRollup to display workflows
with “conclusion: ACTION_REQUIRED”. Those are workflows that need manual
approval before they run (e.g., first-time contributor PRs).

The Checks tab now shows:

- “Workflows awaiting approval” status, with count, in the overview box
- A segment in the checks progress bar (warning color)
- A “Workflows Awaiting Approval” section listing each workflow by name
Add a new “approve all workflows” action (V key) that approves all
workflow runs having “conclusion: ACTION_REQUIRED” for the selected PR.

The task runs three sequential gh CLI steps in the background:

1. Get the PR’s head SHA
2. Query for workflow runs with status=action_required for that SHA
3. POST to the /approve endpoint for each run (best-effort)

Limitation: The GitHub API doesn’t support approving non-fork-PR
workflows (e.g., pull_request_review-triggered runs). In cases where you
try to approve such workflows from dash, you’ll get an error message
explaining that limitation. (You’d otherwise get an arcane message.)

Wired up in the PR section view, notification PR view, and the
notification action executor, following the existing confirmation-based
action pattern (close, merge, update, etc.).
Add a comment explaining that workflows awaiting approval
(ACTION_REQUIRED) and queued workflows have no CheckRun objects yet,
so they don't appear in StatusCheckRollup.contexts.

Also remove the unused App.Slug field from CheckSuiteNode.
All confirmation prompts display "(Y/n)" — the capital Y convention
means pressing Enter with no input should be treated as "yes." But
the code only accepted explicit "Y" or "y", making bare Enter a no-op.

Add empty-string check to the confirmation input in all four section
handlers: prssection, issuessection, notificationssection, reposection.
@sideshowbarker sideshowbarker force-pushed the checks-awaiting-approval branch from 2fd71d8 to 6aad8d7 Compare February 17, 2026 09:52
Copy link
Owner

@dlvhdr dlvhdr left a comment

Choose a reason for hiding this comment

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

this is great!

@dlvhdr dlvhdr merged commit 73ea6cf into dlvhdr:main Feb 18, 2026
3 checks passed
@sideshowbarker sideshowbarker deleted the checks-awaiting-approval branch February 19, 2026 02:15
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.

2 participants