Skip to content

test

test #4

name: Issue Commenter
on:
issues:
types: [opened, closed]
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Comment on Issue Opened
if: github.event.action == 'opened'
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \
-d '{"body": "Thank you for opening an issue! We will review it soon."}'
- name: Comment on Issue Closed
if: github.event.action == 'closed'
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \
-d '{"body": "The issue has been closed. Thank you for your contribution!"}'