From e09eb956a1abdbb1fbb4deeb2a5c6db5ca47cbfe Mon Sep 17 00:00:00 2001
From: Pratham Mahajan <111378171+Killer2OP@users.noreply.github.com>
Date: Tue, 31 Oct 2023 20:45:30 +0530
Subject: [PATCH] Update auto_comment.yml
---
.github/workflows/auto_comment.yml | 47 +++++++++++++-----------------
1 file changed, 21 insertions(+), 26 deletions(-)
diff --git a/.github/workflows/auto_comment.yml b/.github/workflows/auto_comment.yml
index 98335275c3c0..b506b1b4b1a8 100644
--- a/.github/workflows/auto_comment.yml
+++ b/.github/workflows/auto_comment.yml
@@ -1,51 +1,46 @@
-name: Auto Comment
+name: Issue Auto Comment
on:
issues:
types:
- opened
- closed
- assigned
- pull_request:
+ pull_request_target:
types:
- opened
- closed
+permissions:
+ contents: read
+
jobs:
run:
+ permissions:
+ issues: write # for actions-cool/issues-helper to update issues
+ pull-requests: write # for actions-cool/issues-helper to update PRs
runs-on: ubuntu-latest
steps:
- name: Auto Comment on Issues Opened
uses: wow-actions/auto-comment@v1
with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
issuesOpened: |
- π @{{ author }}
+ π @{{ author }}
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
- name: Auto Comment on Issues Closed
uses: wow-actions/auto-comment@v1
with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
issuesClosed: |
- π @{{ author }} This issue is closed.
- - name: Auto Comment on Pull Request Merged
- uses: wow-actions/auto-comment@v1
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- pullRequestMerged: |
- π @{{ author }} π Congrats on your merged pull request! Thanks for the valuable contribution! ππ Congrats on your merged pull request! Thanks for the valuable contribution! π
- - name: Auto Comment on Pull Request Opened
- uses: wow-actions/auto-comment@v1
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- pullRequestOpened: |
- Helloπ @{{ author }}, I hope you are doing well!
-
- Thank you for raising your pull request and contributing to our Community π
- Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
- - name: Auto Comment on Issues Assigned
- uses: wow-actions/auto-comment@v1
+ β
@{{ author }}
+
+ This issue is closed, If you have any questions.
+ - name: Remove inactive
+ if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login
+ uses: actions-cool/issues-helper@v3
with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- issuesAssigned: |
- Hello @{{ author }}, thank you for raising an issue. π I have assigned the issue to you. You can now start working on it. If you encounter any problems, please feel free to connect with us. π
+ actions: 'remove-labels'
+ token: ${{ secrets.GH_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ labels: 'Inactive'