ReviewOS

also looking at this

stacks/buddy

feat(ci): let @buddy fix-ci find the run a comment cannot name

#1413
Merged glennmichael123 wants to merge feat/fix-ci-from-comment into main
10 files +697 -121
src/ci/base.tsmodified+5-1
Changes to src/ci/base.ts
@@ -99,10 +99,14 @@ export async function failsOnBaseBranch(
9999 * answers the question actually being asked — is this workflow red on base
100100 * right now — and drops a workflow whose latest run has since gone green.
101101 *
102 * Also used to pick *which* run a comment is asking about: the same
103 * interleaving that makes a base-branch check ambiguous makes "the run that
104 * failed on this pull request" ambiguous too.
105 *
102106 * @param runs - Runs, most recent first
103107 * @returns The newest run of each workflow, kept only where it failed
104108 */
105function latestFailurePerWorkflow(runs: WorkflowRun[]): WorkflowRun[] {
109export function latestFailurePerWorkflow(runs: WorkflowRun[]): WorkflowRun[] {
106110 const newest = new Map<string, WorkflowRun>()
107111
108112 for (const run of runs) {