Skip to content

Commit

Permalink
Update open_close_issue.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
smog-root authored Oct 21, 2024
1 parent 47ea702 commit 2e29583
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/open_close_issue.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Issue Commenter
name: Issue Auto Comment

# Created by @smog-root

on:
issues:
Expand All @@ -7,22 +9,21 @@ on:
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: Add a comment when an issue is opened
if: github.event.action == 'opened'
uses: actions-ecosystem/action-create-comment@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.issue.number }}
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! 🚀
"

- 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!"}'
- name: Add a comment when an issue is closed
if: github.event.action == 'closed'
uses: actions-ecosystem/action-create-comment@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.issue.number }}
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! 🚀
name: Auto-comment bot for issues"

0 comments on commit 2e29583

Please sign in to comment.