also looking at this
feat(ci): let @buddy fix-ci find the run a comment cannot name
#1413
10 files
+697
-121
| @@ -99,10 +99,14 @@ export async function failsOnBaseBranch( | ||
| 99 | 99 | * answers the question actually being asked — is this workflow red on base |
| 100 | 100 | * right now — and drops a workflow whose latest run has since gone green. |
| 101 | 101 | * |
| 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 | * | |
| 102 | 106 | * @param runs - Runs, most recent first |
| 103 | 107 | * @returns The newest run of each workflow, kept only where it failed |
| 104 | 108 | */ |
| 105 | function latestFailurePerWorkflow(runs: WorkflowRun[]): WorkflowRun[] { | |
| 109 | export function latestFailurePerWorkflow(runs: WorkflowRun[]): WorkflowRun[] { | |
| 106 | 110 | const newest = new Map<string, WorkflowRun>() |
| 107 | 111 | |
| 108 | 112 | for (const run of runs) { |