Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): stop PR watch flapping while workflows await approval #24599

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 14 commits intomain fromrefs/pull/24599/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 10 changed files with 156 additions and 0 deletions (loading 7).

x
0 of 10 viewed, 10 left
6 additions and 0 deletionsapps/server/src/orchestration-v2/Orchestrator.tsModified
View file
@@ -4158,6 +4158,12 @@
...(existing.endedWatch?.owedChecks !== undefined && {
owedChecks: existing.endedWatch.owedChecks,
+ ...(existing.endedWatch?.awaitingApproval !== undefined && {
+ awaitingApproval: existing.endedWatch.awaitingApproval,
+ }),
+ ...(existing.endedWatch?.approvalAnnounced !== undefined && {
+ approvalAnnounced: existing.endedWatch.approvalAnnounced,
+ }),
...(existing.endedWatch?.checksAwaitedSince !== undefined && {
checksAwaitedSince: existing.endedWatch.checksAwaitedSince,
2 additions and 0 deletionsapps/server/src/orchestration-v2/PullRequestWatchReactor.tsModified
View file
@@ -178,6 +178,8 @@
left.passed === right.passed &&
left.passedChecks.join("\n") === right.passedChecks.join("\n") &&
(left.owedChecks ?? []).join("\n") === (right.owedChecks ?? []).join("\n") &&
+ (left.awaitingApproval ?? []).join("\n") === (right.awaitingApproval ?? []).join("\n") &&
+ (left.approvalAnnounced ?? false) === (right.approvalAnnounced ?? false) &&
left.remarksThrough === right.remarksThrough &&
left.remarkIds.join("\n") === right.remarkIds.join("\n") &&
left.conflicting === right.conflicting &&
148 additions and 0 deletionsapps/server/src/orchestration-v2/pullRequestWatch.test.tsModified
View file