From 9d2a3fc5e662f0662f5b0cca46e1c5b04b4c9e10 Mon Sep 17 00:00:00 2001 From: nollymarlonga Date: Fri, 22 May 2026 15:30:20 -0500 Subject: [PATCH 1/2] feat(release): compact Slack QA section + @-mention flagged-PR authors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous detailed Slack section grew too tall for the channel UI to display inline — Slack auto-collapses messages over ~4000 chars, so the list of flagged PRs ended up hidden behind a "Show more" link. The plain `@author` text also didn't trigger Slack notifications, so the people whose action was needed never knew. Redesign: • The Slack snippet is now just the counts (each linked to the workflow run summary) and a cc line that mentions the authors of flagged PRs. • Mentions are real Slack `<@USERID>` mentions when the GitHub login is in `.github/data/slack-mappings.json`. Unmapped users fall back to plain `@login` so the message still names them. • The full detailed report (PR-by-PR tables) is written to `$GITHUB_STEP_SUMMARY` via a new `--format markdown` so reviewers can drill in from the workflow run page linked by the counts. New CLI flags on release-qa-status: --format markdown GitHub-flavored markdown report --mappings PATH slack-mappings.json for GH→Slack ID resolution --detail-url URL link target for each count in the slack output Tests: 35/35 pass. New cases cover detailUrl wrapping, the cc line with mapped + unmapped + deduped + case-insensitive matching, exclusion of passed-bucket authors from the cc, and the markdown format. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../release-qa-status/src/format.test.ts | 128 +++++++-- .../scripts/release-qa-status/src/format.ts | 265 ++++++++++++------ .../scripts/release-qa-status/src/index.ts | 99 +++++-- .../scripts/release-qa-status/src/types.ts | 12 +- .github/workflows/cicd_6-release.yml | 25 +- 5 files changed, 393 insertions(+), 136 deletions(-) diff --git a/.github/scripts/release-qa-status/src/format.test.ts b/.github/scripts/release-qa-status/src/format.test.ts index ba484e934d3..22cdf522789 100644 --- a/.github/scripts/release-qa-status/src/format.test.ts +++ b/.github/scripts/release-qa-status/src/format.test.ts @@ -1,5 +1,5 @@ -import { renderSlack } from './format'; -import { ReleaseQAReport, PRQAResult } from './types'; +import { renderMarkdown, renderSlack } from './format'; +import { PRQAResult, ReleaseQAReport, SlackMapping } from './types'; function pr( number: number, @@ -59,7 +59,7 @@ describe('renderSlack', () => { expect(renderSlack(r)).toContain(':rotating_light: *QA Coverage*'); }); - it('uses the requested count labels', () => { + it('renders the count labels exactly as requested', () => { const r = report({ summary: { failed: 1, missing: 2, unlinked: 3, external: 4, passed: 0, excluded: 0 }, failed: [pr(1, 't', 'failed')], @@ -71,35 +71,121 @@ describe('renderSlack', () => { expect(out).toContain('Not in the core repo: 4'); }); - it('truncates very long titles with an ellipsis', () => { - const longTitle = 'x'.repeat(200); + it('does NOT include a detailed PR list in the slack snippet', () => { const r = report({ - summary: { failed: 0, missing: 1, unlinked: 0, external: 0, passed: 0, excluded: 0 }, - missing: [pr(10, longTitle, 'missing')], + summary: { failed: 0, missing: 2, unlinked: 0, external: 0, passed: 0, excluded: 0 }, + missing: [ + pr(35463, 'feat(maintenance): thread dump endpoints', 'missing'), + pr(35726, 'fix(edit-content): normalize lockedBy', 'missing'), + ], }); const out = renderSlack(r); - expect(out).toContain('…'); - // Original 200-char title should not appear verbatim - expect(out).not.toContain(longTitle); + // Compact: just counts + cc line, no per-PR lines. + expect(out).not.toContain('thread dump'); + expect(out).not.toContain('normalize lockedBy'); + expect(out).not.toContain('https://github.com/dotCMS/core/pull/35463'); }); - it('escapes mrkdwn-meaningful characters in titles', () => { + it('wraps each count in a Slack link when detailUrl is provided', () => { const r = report({ - summary: { failed: 0, missing: 1, unlinked: 0, external: 0, passed: 0, excluded: 0 }, - missing: [pr(10, 'fix