Skip to content

Commit 3dfad69

Browse files
authored
fix: check for directory before updating bot comment (#26)
* Check for directory before updating bot comment * fix: syntax error * Check for all directories in job
1 parent 6e9ba71 commit 3dfad69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ runs:
138138
repo: context.repo.repo,
139139
});
140140
141+
directories = '${{ inputs.directory }}'.split(' ')
141142
botComment = comments.find(comment => {
142-
return comment.user.type === 'Bot' && comment.body.includes('Terraform check on')
143+
return comment.user.type === 'Bot' && directories.every(dir => comment.body.includes(`Terraform check on ${dir}`))
143144
});
144145
}
145146

0 commit comments

Comments
 (0)