Skip to content

Reply-Bot

Reply-Bot #46

Workflow file for this run

# Reply Bot
name: Reply-Bot
on:
discussion:
types: [created]
discussion_comment: # testing
types: [created]
permissions:
contents: read
issues: write
pull-requests: write
discussions: write
jobs:
bot-response:
runs-on: ubuntu-24.04
steps:
- name: Check out the repository to the runner
uses: actions/checkout@v4
- name: analyze
id: analyze
run: |
body="$(echo ${{ github.event.discussion.body }} | sed 's/`/x/g')"
echo "$body"
python discussion-bot/main.py --actor "${{ github.actor }}" --title "${{ github.event.discussion.title }}" --body "$body"
response="$(cat response.md | sed 's/$/\\n/g' | tr -d '\n')"
echo "$response"
echo "response=$response" >> $GITHUB_OUTPUT
- name: Run discussion-auto-responder
uses: wesleyscholl/discussion-auto-responder@v1.0.8
id: autoresponder-comment
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
comment_body: "${{ steps.analyze.outputs.response }}"
delay_milliseconds: 1000