-
-
Notifications
You must be signed in to change notification settings - Fork 224
46 lines (44 loc) · 1.45 KB
/
recent_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
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Recent-Reminder
on:
schedule:
- cron: '00 13 * * 1'
workflow_dispatch:
jobs:
stale-reminder:
runs-on: ubuntu-latest
steps:
- name: Get cutoff dates
id: date
run: |
echo "RECENT_ISSUE_CUTOFF_DATE=$(date -d '-7 days' '+%Y-%m-%d')" >> $GITHUB_ENV
- name: Get list of issues that have had interactions in the last week
id: recent
uses: lee-dohm/select-matching-issues@v1
with:
format: list
path: "recent_issues.md"
token: ${{ github.token }}
query: >-
is:issue
is:open
updated:>=${{ env.RECENT_ISSUE_CUTOFF_DATE }}
sort:updated-asc
- name: Combine issues into mail content
id: combine
run: |
echo "## Issues that have had interaction in the last 7 days <br />" >> mail.html
echo "$(<recent_issues.md) <br />" >> mail.html
- name: Send mail
id: mail
uses: dawidd6/action-send-mail@v3
with:
server_address: ${{secrets.MAIL_SERVER_ADDRESS}}
server_port: ${{secrets.MAIL_SERVER_PORT}}
secure: true
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: '[Current SMAC3 Issues] Issues that have been interacted with since ${{ env.RECENT_ISSUE_CUTOFF_DATE }}'
to: ${{secrets.MAIL_TARGET}}
from: SMAC3 Stale-Bot <${{secrets.MAIL_ADDRESS}}>
html_body: file://mail.html
convert_markdown: true