|
1 | 1 | # This workflow handles issue comments.
|
| 2 | +# See for more info: https://github.com/actions/github-script |
2 | 3 |
|
3 |
| -name: Issue Assignee Comment |
| 4 | +name: Issue Comments |
4 | 5 |
|
5 | 6 | on:
|
6 | 7 | issues:
|
|
11 | 12 | jobs:
|
12 | 13 | # When issues are assigned, a comment is posted
|
13 | 14 | # Tags the assignee with links to helpful resources
|
14 |
| - # See for more info: https://github.com/actions/github-script |
15 | 15 | assigned-comment:
|
| 16 | + if: github.event.action == 'assigned' |
16 | 17 | runs-on: ubuntu-latest
|
17 | 18 | steps:
|
18 | 19 | - name: Post assignee issue comment
|
|
33 | 34 | Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you!
|
34 | 35 | Learn more about Chayn [here](https://linktr.ee/chayn) and [explore our projects](https://org.chayn.co/projects). 🌸`
|
35 | 36 | })
|
| 37 | +
|
| 38 | + # When issues are labeled as stale, a comment is posted. |
| 39 | + # Tags the assignee with warning. |
| 40 | + # Enables manual issue management in addition to community-stale-management.yml |
| 41 | + stale-label-comment: |
| 42 | + if: github.event.action == 'labeled' && github.event.label.name == 'stale' |
| 43 | + runs-on: ubuntu-latest |
| 44 | + steps: |
| 45 | + - name: Post stale issue comment |
| 46 | + id: stale-label-comment |
| 47 | + uses: actions/github-script@v7 |
| 48 | + with: |
| 49 | + github-token: ${{secrets.GITHUB_TOKEN}} |
| 50 | + script: | |
| 51 | + github.rest.issues.createComment({ |
| 52 | + owner: context.repo.owner, |
| 53 | + repo: context.repo.repo, |
| 54 | + issue_number: context.payload.issue.number, |
| 55 | + 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.` |
| 56 | + }) |
0 commit comments