Prefix_only doesn't work
Opened this issue · 2 comments
GabrieleCalarota commented
Hi,
I'm encountering this issue using this action khan/pull-request-comment-trigger@master using:
- uses: khan/pull-request-comment-trigger@master
id: check
with:
trigger: '!deploy'
prefix_only: 'true'
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
Action gets triggered also if "!deploy" is in the middle of a comment (not according to README.md docs)
Also --> trying to get steps.check.outputs.comment_body is empty
GabrieleCalarota commented
This line of code should be like this:
const prefixOnly = core.getInput("prefix_only") === 'true';
if ((prefixOnly && !body.startsWith(trigger)) || (!prefixOnly && !body.includes(trigger))) {
core.setOutput("triggered", "false");
return;
}
GabrieleCalarota commented
Any update on this @jaredly ?