File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -36,19 +36,18 @@ export const createRun = async (
3636} ;
3737
3838const commentLocator = ( label ?: string ) : string => {
39- return `<!-- Diff Action / Pull Request Comment / ${ label ?? '' } -->
40-
41- ` ;
39+ return `<!-- Diff Action / Pull Request Comment / ${ label ?? '' } -->` ;
4240} ;
4341
4442const 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
5453const 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 }
You can’t perform that action at this time.
0 commit comments