Skip to content

test-for-workflow

test-for-workflow #24

name: Trigger NeuralChat BOT
on: issue_comment
jobs:
issue_commented:
# This job only runs for issue comments
name: Issue comment
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- run: |
echo comment on issue $NUMBER
echo comment ${{ github.event.comment.body }}
echo assignee ${{ github.event.issue.assignees }}
echo issue id ${{ github.event.issue.id }}
echo comment id ${{ github.event.comment.id }}
comment_content="${{ github.event.comment.body }}"
if [[ ${comment_content} == "If you need help, please @NeuralChatBot" ]]; then
echo "ignore instructions"
elif [[ ${comment_content} == *"@NeuralChatBot"* ]]; then
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ vars.TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/VincyZhang/intel-extension-for-transformers/issues/${{ github.event.issue.number }}/comments \
-d '{"body":"NeuralChatBot is on the way!"}'
fi
env:
NUMBER: ${{ github.event.issue.number }}