Skip to content

Commit a0ea300

Browse files
committed
Fix bot trigger event
Issue events don't contain a 'comment' entry: https://developer.github.com/v3/issues/events/#response-2 Issue comments also contain the original issue body: https://developer.github.com/v3/activity/events/types/#issuecommentevent That's why it was triggering even for comments on the issue. Also changed to startsWith because there's no need to support the command anywhere in the body IMO. Fix #6895
1 parent 4f8fff9 commit a0ea300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/release-on-comment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313

14-
if: (github.event.comment && contains(github.event.comment.body, '@pytestbot please')) || (github.event.issue && contains(github.event.issue.body, '@pytestbot please'))
14+
if: (github.event.comment && startsWith(github.event.comment.body, '@pytestbot please')) || (github.event.issue && !github.event.comment && startsWith(github.event.issue.body, '@pytestbot please'))
1515

1616
steps:
1717
- uses: actions/checkout@v1

0 commit comments

Comments
 (0)