Repository navigation
fix(shared): a watched PR whose checks passed stops holding its thread #34800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
b16ae8d
fd1bf1b
f5ca7c4
98672ae
6f8e257
988e08b
3d3fe48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,12 +56,14 @@ export function evaluatePullRequestWatch( | |
| let owedChecks = headMoved ? [] : (watch.owedChecks ?? []); | ||
| let awaitingApproval = headMoved ? [] : (watch.awaitingApproval ?? []); | ||
| let approvalAnnounced = headMoved ? false : (watch.approvalAnnounced ?? false); | ||
| let checksPending = headMoved ? undefined : watch.checksPending; | ||
| // An unavailable approval read cannot establish success or that no checks exist. | ||
| const unread = detail.checks.some((check) => check.placeholder === true); | ||
| const checks = detail.checks.filter((check) => check.placeholder !== true); | ||
| const failed = checks.filter(isFailedCheck); | ||
| const awaiting = checks.filter((check) => check.status === "action-required"); | ||
| if (checks.length > 0) { | ||
| checksPending = checks.some((check) => check.status === "pending"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the completion hold when a read includes unlisted checks. A placeholder check stands for checks the host could not list. A read that has only successful visible checks plus a placeholder currently sets Clear Suggested fix
|
||
| const newlyFailed = failed.filter((check) => !failedChecks.includes(check.name)); | ||
| if (newlyFailed.length > 0) changes.push({ kind: "checks-failed", failed: newlyFailed }); | ||
| if (!approvalAnnounced && awaiting.length > 0) { | ||
|
|
@@ -200,6 +202,7 @@ export function evaluatePullRequestWatch( | |
| owedChecks, | ||
| awaitingApproval, | ||
| approvalAnnounced, | ||
| ...(checksPending !== undefined && { checksPending }), | ||
| remarksThrough, | ||
| remarkIds, | ||
| conflicting, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.