-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (24 loc) · 995 Bytes
/
open_close_issue.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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!"}'