Trigger a github workflow if it matches a particular comment in the Pull Request #25389
-
I want to trigger a workflow if it matches a particular comment (string) in a pull request. If the action receives /support comment if should trigger the workflow which is running some command say echo “Hello World” |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
Hi @uditgaurav, There is not a specific event which only monitor the pull request event, you can use ‘issue_comment’ instead, it will monitor comment for both issue and pull request. In the job level, use if expression to filter the comment, exclude the comments from issue.
I tried on my repo, and it works fine. Thanks Note: please use issue_comment in default branch,eg: master branch. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I upgraded Github enterprise server version to 3.6.3 it works now |
Beta Was this translation helpful? Give feedback.
-
This trick triggers the job, but does not show in PR checks |
Beta Was this translation helpful? Give feedback.
-
It also does not pass the ref for the branch into the checkout action |
Beta Was this translation helpful? Give feedback.
Hi @uditgaurav,
There is not a specific event which only monitor the pull request event, you can use ‘issue_comment’ instead, it will monitor comment for both issue and pull request. In the job level, use if expression to filter the comment, exclude the comments from issue.
Code sample as below: