-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (50 loc) · 2.23 KB
/
community-issue-comment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# 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.`
})