Bump actions/checkout from 3 to 4 #1
This file contains 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
# This workflow handles issue comments. | |
# See for more info: https://github.com/actions/github-script | |
name: Issue Comments | |
on: | |
issues: | |
types: | |
- assigned | |
- labeled | |
jobs: | |
# When issues are assigned, a comment is posted | |
# Tags the assignee with links to helpful resources | |
assigned-comment: | |
if: github.event.action == 'assigned' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Post assignee issue comment | |
id: assigned-comment | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.payload.issue.number, | |
body: `Thank you @${context.payload.issue.assignee.login} you have been assigned this issue! | |
**Please follow the directions in our [Contributing Guide](https://github.com/chaynHQ/.github/blob/main/docs/CONTRIBUTING.md). We look forward to reviewing your pull request shortly ✨** | |
--- | |
Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you! | |
Learn more about Chayn [here](https://linktr.ee/chayn) and [explore our projects](https://org.chayn.co/projects). 🌸` | |
}) | |
# When issues are labeled as stale, a comment is posted. | |
# Tags the assignee with warning. | |
# Enables manual issue management in addition to community-stale-management.yml | |
stale-label-comment: | |
if: github.event.action == 'labeled' && github.event.label.name == 'stale' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Post stale issue comment | |
id: stale-label-comment | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.payload.issue.number, | |
body: `@${context.payload.issue.assignee.login} As per Chayn policy, after 30 days of inactivity, we will be unassigning this issue. Please comment to stay assigned.` | |
}) |