Skip to content

Commit 2e29583

Browse files
authored
Update open_close_issue.yml
1 parent 47ea702 commit 2e29583

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed
+19-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
name: Issue Commenter
1+
name: Issue Auto Comment
2+
3+
# Created by @smog-root
24

35
on:
46
issues:
@@ -7,22 +9,21 @@ on:
79
jobs:
810
comment:
911
runs-on: ubuntu-latest
10-
1112
steps:
12-
- name: Comment on Issue Opened
13-
if: github.event.action == 'opened'
14-
run: |
15-
curl -X POST \
16-
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
17-
-H "Accept: application/vnd.github.v3+json" \
18-
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \
19-
-d '{"body": "Thank you for opening an issue! We will review it soon."}'
13+
- name: Add a comment when an issue is opened
14+
if: github.event.action == 'opened'
15+
uses: actions-ecosystem/action-create-comment@v1
16+
with:
17+
github_token: ${{ secrets.GITHUB_TOKEN }}
18+
issue_number: ${{ github.event.issue.number }}
19+
body: "👋 Thanks for opening this issue! We appreciate your contribution. Please make sure you’ve provided all the necessary details and screenshots, and don't forget to follow our Guidelines and Code of Conduct. Happy coding! 🚀
20+
"
2021

21-
- name: Comment on Issue Closed
22-
if: github.event.action == 'closed'
23-
run: |
24-
curl -X POST \
25-
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
26-
-H "Accept: application/vnd.github.v3+json" \
27-
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \
28-
-d '{"body": "The issue has been closed. Thank you for your contribution!"}'
22+
- name: Add a comment when an issue is closed
23+
if: github.event.action == 'closed'
24+
uses: actions-ecosystem/action-create-comment@v1
25+
with:
26+
github_token: ${{ secrets.GITHUB_TOKEN }}
27+
issue_number: ${{ github.event.issue.number }}
28+
body: " ✅ This issue has been successfully closed. Thank you for your contribution and helping us improve the project! If you have any more ideas or run into other issues, feel free to open a new one. Happy coding! 🚀
29+
name: Auto-comment bot for issues"

0 commit comments

Comments
 (0)