Skip to content

Commit 7e91612

Browse files
committed
scale per-section limits proportionally to top-n parameter
1 parent fa21912 commit 7e91612

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/actions/playwright-test-health-report/lib/slack-test-health-blocks.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export function createSlackBlocks(summary, dateDisplay, options) {
3737
workflowCount,
3838
} = options;
3939

40-
const maxBroken = Math.min(topN > 5 ? 5 : Math.floor(topN / 2), topN);
41-
const maxFlaky = Math.min(topN > 10 ? 3 : Math.floor(topN / 3), topN);
42-
const maxReview = Math.min(topN > 10 ? 2 : 1, topN);
40+
const maxBroken = Math.max(Math.ceil(topN * 0.5), 3);
41+
const maxFlaky = Math.max(Math.ceil(topN * 0.3), 2);
42+
const maxReview = Math.max(Math.ceil(topN * 0.2), 1);
4343

4444
const brokenItems = summary.filter(item => item.brokenCount > 0);
4545
const flakyItems = summary.filter(item => item.brokenCount === 0 && item.flakyCount > 0);

0 commit comments

Comments
 (0)