-
Notifications
You must be signed in to change notification settings - Fork 276
33 lines (30 loc) · 1.02 KB
/
issue-reminder.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
name: "Open-Issue-Reminder"
on:
schedule:
- cron: "0 12 */3 * *"
jobs:
welcome:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Run script
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: issues } = await github.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
});
for (const issue of issues) {
const issueComment = `Hi there! This issue is still open. We are waiting for your response.
Assignees: ${issue.assignees.map(assignee => '@' + assignee.login).join(', ') || 'None'}`;
await github.issues.createComment({
issue_number: issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: issueComment
});
}