Repository navigation
Surface and approve pending PR workflows 🤖🤖🤖 - #6314
aaronpowell wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🚦 Submission status: 👀 Ready for reviewRisk tier: Why this tier
Automated checks
Action needed
Review
Commands
Updated for |
|
🟡 Contributor Reputation Check: MEDIUM risk
Maintainers: please review this contributor before merging. |
| ` diff: +${item.additions}/-${item.deletions} across ${item.changedFiles} files`, | ||
| ` checks: ${checks} | review decision: ${promptData(item.reviewDecision, 50)} | merge state: ${promptData(item.mergeStateStatus, 50)}`, | ||
| ` fork workflows awaiting execution approval: ${item.workflowApprovals?.length ?? 0}${item.workflowApprovalError ? " (discovery unavailable)" : ""}`, | ||
| ` workflows awaiting execution approval: ${item.workflowApprovals?.length ?? 0}${item.workflowApprovalError ? " (discovery unavailable)" : ""}`, |
There was a problem hiding this comment.
🟡 Changes recommended
Automatic approval can authorize another PR’s merge-context workflow when an empty pull_requests list bypasses PR-number and base-branch checks.
2 open issues
What changed in this PR
Extends the Open PR Board’s workflow approval support to public same-repository PRs, including bot-created PRs, alongside public forks.
Changes:
- Surfaces eligible waiting workflows on cards and in Checks, excluding runs with existing jobs.
- Adds workflow authorization to individual and bulk Approve + auto-merge, with freshness checks and partial-result recording.
- Updates execution warnings, documentation, and regression coverage.
| File | Description |
|---|---|
eng/open-pr-board-workflow-approval.test.mjs |
Covers same-repository discovery, combined approvals, stale state, and partial failures. |
eng/board-preview.test.mjs |
Checks execution disclosures and pending-workflow rendering. |
eng/board-bulk-actions.test.mjs |
Verifies bulk approval safety disclosures. |
.github/extensions/open-pr-board/README.md |
Documents eligibility, combined actions, and failure handling. |
.github/extensions/open-pr-board/public/index.html |
Explains workflow authorization in the action footer. |
.github/extensions/open-pr-board/public/app.js |
Updates confirmations and the Checks interface. |
.github/extensions/open-pr-board/lib/review-prompt.mjs |
Broadens review guidance beyond fork workflows. |
.github/extensions/open-pr-board/lib/github.mjs |
Adds jobs validation and workflow authorization during combined approval. |
.github/extensions/open-pr-board/lib/decisions.mjs |
Records workflow approvals separately from PR decisions. |
Review effort: Max (auto)
| const result = await approveWorkflowRun(repo, number, { | ||
| runId: workflow.id, attempt: workflow.attempt, headRefOid, | ||
| }, runner); |
| for (const workflow of workflows) { | ||
| try { | ||
| const result = await approveWorkflowRun(repo, number, { | ||
| runId: workflow.id, attempt: workflow.attempt, headRefOid, |


Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
Bot-created and other same-repository PRs can have workflows waiting for approval, but the Open PR Board previously only discovered approvals for public forks.
gh api.Type of Contribution
Additional Notes
npm start- passed; no generated README changes. The external catalog reported three existing non-SPDX license warnings.npm run plugin:validate- passed with the same license warnings.node --experimental-vm-modules --test --test-reporter=dot eng\open-pr-board-workflow-approval.test.mjs eng\open-pr-board.test.mjs eng\board-preview.test.mjs eng\board-bulk-actions.test.mjs eng\open-pr-board-prompt-security.test.mjs eng\board-periodic-refresh.test.mjs- passed.bash eng/fix-line-endings.sh- passed.By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.