From 92d4aea5ffacc38c5f7903b9410d0abec83f14de Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Wed, 4 Feb 2026 11:25:09 -0500 Subject: Refs #36620 -- Shortened coverage diff comment. --- .github/workflows/coverage_comment.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/coverage_comment.yml b/.github/workflows/coverage_comment.yml index fc58575836..287cc558b5 100644 --- a/.github/workflows/coverage_comment.yml +++ b/.github/workflows/coverage_comment.yml @@ -45,8 +45,15 @@ jobs: let body = 'No coverage data available.'; if (fs.existsSync(reportPath)) { body = fs.readFileSync(reportPath, 'utf8'); + const divider = '-------------'; + // Start after the second divder, where changed files are listed. + const start = body.indexOf(divider, 1); + body = body.substring(start); } - const commentBody = '### 📊 Coverage Report for Changed Files\n\n```\n' + body + '\n```\n\n**Note:** Missing lines are warnings only. Some lines may not be covered by SQLite tests as they are database-specific.\n\nFor more information about code coverage on pull requests, see the [contributing documentation](https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#code-coverage-on-pull-requests).'; + const commentBody = ( + '#### Uncovered lines in changed files\n\n```\n' + body + '```\n' + + + '**Note:** Missing lines are warnings only. Some database-specific lines may not be measured. [More information](https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#code-coverage-on-pull-requests)' + ); const prNumber = parseInt(process.env.PR_NUMBER); if (isNaN(prNumber)) { -- cgit v1.3