Skip to content

Commit 03c1f71

Browse files
committed
fix: correct override summary grammar
1 parent 205b06b commit 03c1f71

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

__tests__/unit/output/formatter-v2.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ describe('MarkdownFormatterV2', () => {
6262

6363
expect(output).toContain('## No Active Findings');
6464
expect(output).not.toContain('## All Clear!');
65+
expect(output).toContain(
66+
'No active findings. 1 finding was dismissed by maintainer/admin `/rr skip` override.'
67+
);
6568
expect(output).toContain('1 finding dismissed by maintainer/admin `/rr skip` override');
6669
expect(output).toContain('| Overrides | 1 dismissed |');
6770
expect(output).not.toContain('This PR looks great! No issues detected');

dist/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19107,7 +19107,10 @@ var MarkdownFormatterV2 = class {
1910719107
}
1910819108
if (this.hasDismissedFindings(review)) {
1910919109
const count = metrics.dismissedFindings ?? 0;
19110-
return `No active findings. ${count} finding${count === 1 ? "" : "s"} were dismissed by maintainer/admin \`/rr skip\` override${count === 1 ? "" : "s"}.`;
19110+
const noun = count === 1 ? "finding" : "findings";
19111+
const verb = count === 1 ? "was" : "were";
19112+
const override = count === 1 ? "override" : "overrides";
19113+
return `No active findings. ${count} ${noun} ${verb} dismissed by maintainer/admin \`/rr skip\` ${override}.`;
1911119114
}
1911219115
return "This PR looks great! No issues detected by the automated review.";
1911319116
}

dist/index.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/output/formatter-v2.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ export class MarkdownFormatterV2 {
141141
}
142142
if (this.hasDismissedFindings(review)) {
143143
const count = metrics.dismissedFindings ?? 0;
144-
return `No active findings. ${count} finding${count === 1 ? '' : 's'} were dismissed by maintainer/admin \`/rr skip\` override${count === 1 ? '' : 's'}.`;
144+
const noun = count === 1 ? 'finding' : 'findings';
145+
const verb = count === 1 ? 'was' : 'were';
146+
const override = count === 1 ? 'override' : 'overrides';
147+
return `No active findings. ${count} ${noun} ${verb} dismissed by maintainer/admin \`/rr skip\` ${override}.`;
145148
}
146149
return 'This PR looks great! No issues detected by the automated review.';
147150
}

0 commit comments

Comments
 (0)