File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Commenting on old issues
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 0 * * *' # Every day at 00:00 UTC
6+ workflow_dispatch :
7+
8+ jobs :
9+ check :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ issues : write
13+ steps :
14+ - name : Comment on old issues
15+ run : |
16+ one_month_ago=$(date --date '1 month ago' '+%Y-%m-%d')
17+
18+ # For the search syntax, see https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests
19+ old_issue_urls=$(gh issue list \
20+ --search "is:open updated:<${one_month_ago} label:\"status: ready to implement\"" \
21+ --json 'url' \
22+ --jq '.[] | .url')
23+
24+ for url in ${old_issue_urls}; do
25+ gh issue comment "${url}" --body "${issue_comment}"
26+ gh issue edit "${url}" --add-label 'status: ask to implement' --remove-label 'status: ready to implement'
27+ done
28+ env :
29+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30+ issue_comment : |-
31+ This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant.
You can’t perform that action at this time.
0 commit comments