File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -238,11 +238,13 @@ export async function doFindComments() {
238238 const commentAuth = core . getInput ( 'comment-auth' ) ;
239239 const bodyIncludes = core . getInput ( 'body-includes' ) ;
240240 const direction = core . getInput ( 'direction' ) === 'desc' ? 'desc' : 'asc' ;
241+ const bodyIncludesArr = dealStringToArr ( bodyIncludes ) ;
241242 for ( const comment of commentList ) {
242243 const checkUser = commentAuth ? comment . user . login === commentAuth : true ;
243- const checkBody = bodyIncludes
244- ? dealStringToArr ( bodyIncludes ) . some ( text => comment . body . includes ( text ) )
245- : true ;
244+ const checkBody =
245+ bodyIncludesArr . length > 0
246+ ? bodyIncludesArr . some ( text => comment . body . includes ( text ) )
247+ : true ;
246248 if ( checkUser && checkBody ) {
247249 comments . push ( {
248250 id : comment . id ,
You can’t perform that action at this time.
0 commit comments