Skip to content

Commit 92d4aea

Browse files
Refs #36620 -- Shortened coverage diff comment.
1 parent c507aaf commit 92d4aea

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/coverage_comment.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,15 @@ jobs:
4545
let body = 'No coverage data available.';
4646
if (fs.existsSync(reportPath)) {
4747
body = fs.readFileSync(reportPath, 'utf8');
48+
const divider = '-------------';
49+
// Start after the second divder, where changed files are listed.
50+
const start = body.indexOf(divider, 1);
51+
body = body.substring(start);
4852
}
49-
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).';
53+
const commentBody = (
54+
'#### Uncovered lines in changed files\n\n```\n' + body + '```\n' +
55+
+ '**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)'
56+
);
5057
5158
const prNumber = parseInt(process.env.PR_NUMBER);
5259
if (isNaN(prNumber)) {

0 commit comments

Comments
 (0)