Linked pipeline autoselect
This commit is contained in:
parent
90d9bc3fcc
commit
f17c7e01f5
9 changed files with 312 additions and 40 deletions
|
@ -59,16 +59,30 @@ export default function Failing() {
|
|||
const failingTestsWithJobs = () => {
|
||||
const silences = silencedAlerts ?? [];
|
||||
for (var test of failing) {
|
||||
if (test.isCompound) continue;
|
||||
const job = jobState.jobs.find((j) =>
|
||||
j.builderCache.testNames.includes(test.name)
|
||||
);
|
||||
if (job) test.job = job;
|
||||
const silence = silences.find(
|
||||
(s) => s.name === test.name || s.class === test.class
|
||||
);
|
||||
|
||||
if (silence) test.silencedUntil = silence;
|
||||
if (test.isPipeline) {
|
||||
const pipeline = jobState.pipelines.find((p) =>
|
||||
p.selectedBranches.includes(test.name)
|
||||
);
|
||||
if (!pipeline) continue;
|
||||
const pipelineJob = jobState.jobs.find(
|
||||
(j) =>
|
||||
j.isPipeline &&
|
||||
j.pipelineId === pipeline.id &&
|
||||
j.branchId === test.name
|
||||
);
|
||||
if (!pipelineJob) test.pipeline = pipeline;
|
||||
test.job = pipelineJob;
|
||||
continue;
|
||||
}
|
||||
const job = jobState.jobs.find(
|
||||
(j) => !j.isPipeline && j.builderCache.testNames.includes(test.name)
|
||||
);
|
||||
if (job) test.job = job;
|
||||
}
|
||||
return failing;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue