Skip to content

Commit bb15f1f

Browse files
committed
move it to the end
1 parent dfe98c9 commit bb15f1f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/notifications.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,18 @@ export const createRun = async (
3636
};
3737

3838
const commentLocator = (label?: string): string => {
39-
return `<!-- Diff Action / Pull Request Comment / ${label ?? ''} -->
40-
41-
`;
39+
return `<!-- Diff Action / Pull Request Comment / ${label ?? ''} -->`;
4240
};
4341

4442
const commentBody = (label: string | undefined, result: Result): string => {
45-
return `${commentLocator(label)}## ${getTitle(label)}: ${result.passed ? 'Success' : 'Failure'}
43+
return `## ${getTitle(label)}: ${result.passed ? 'Success' : 'Failure'}
4644
${result.summary}
4745
4846
\`\`\`
4947
${result.output}
5048
\`\`\`
51-
`;
49+
50+
${commentLocator(label)}`;
5251
};
5352

5453
const createComment = async (
@@ -93,7 +92,7 @@ const findComment = async (
9392
issue_number: context.issue.number,
9493
})) {
9594
for (const comment of entry.data) {
96-
if (comment.body?.startsWith(locator) && comment.user?.login === viewer.login) {
95+
if (comment.body?.endsWith(locator) && comment.user?.login === viewer.login) {
9796
return comment.id;
9897
}
9998
}

0 commit comments

Comments
 (0)