[FEATURE] <new update> #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto Comment Bot | |
| on: | |
| issues: | |
| types: [opened] | |
| pull_request: | |
| types: [opened] | |
| jobs: | |
| comment: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Add Comment | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const issueOrPR = context.payload.issue || context.payload.pull_request; | |
| const isPR = !!context.payload.pull_request; | |
| const message = isPR | |
| ? `Thanks for opening this Pull Request! A maintainer will review it shortly. Please make sure you've followed all [contribution guidelines](https://github.com/SrigadaAkshayKumar/stock/blob/main/CONTRIBUTION.md).` | |
| : `Thanks for creating an issue! We’ll review it and get back to you shortly. If it’s a feature request, consider adding screenshots or a demo video for clarity.`; | |
| github.rest.issues.createComment({ | |
| issue_number: issueOrPR.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: message | |
| }); |