minor fixes to contribution notes #3
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 on PRs and Issues | |
| on: | |
| issues: | |
| types: [opened] | |
| pull_request: | |
| types: [opened] | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| auto-comment: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Post Comment | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const issue_number = context.payload.issue ? context.payload.issue.number : context.payload.pull_request.number; | |
| const repo = context.repo; | |
| const message = `Thank you for your contribution! | |
| I am maintaining this repository as a side thing, so my availability varies with time. | |
| No coffee is expected, but please leave a star if you find this repository useful :) | |
| Please feel free to ping this issue/PR if I don't respond for a while.`; | |
| github.rest.issues.createComment({ | |
| owner: repo.owner, | |
| repo: repo.repo, | |
| issue_number: issue_number, | |
| body: message | |
| }); |