From e64e1918eeb88e93f9f201ece343624fb2943e9d Mon Sep 17 00:00:00 2001 From: helegraf Date: Fri, 2 Jun 2023 09:26:14 +0200 Subject: [PATCH] Update stale report to include issues with recent interactions (#1024) Add recently updated issues to list of reminders. --- .github/workflows/stale_reminder.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale_reminder.yml b/.github/workflows/stale_reminder.yml index bed720a61..ce1327683 100644 --- a/.github/workflows/stale_reminder.yml +++ b/.github/workflows/stale_reminder.yml @@ -9,10 +9,23 @@ jobs: stale-reminder: runs-on: ubuntu-latest steps: - - name: Get cutoff date for soon-to-be-stale issues + - name: Get cutoff dates id: date run: | echo "CUTOFF_DATE=$(date -d '-46 days' '+%Y-%m-%d')" >> $GITHUB_ENV + 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: Collect issues that may become stale id: stale uses: lee-dohm/select-matching-issues@v1 @@ -21,6 +34,7 @@ jobs: path: "potentially_stale_issues.md" token: ${{ github.token }} query: >- + is:issue is:open -label:dependency,documentation,feature,enhancement,bug,test,example,discussion,duplicate,question updated:<${{ env.CUTOFF_DATE }} @@ -33,6 +47,7 @@ jobs: path: "old_issues.md" token: ${{ github.token }} query: >- + is:issue is:open label:dependency,documentation,feature,enhancement,bug,test,example,discussion,duplicate,question updated:<${{ env.CUTOFF_DATE }} @@ -40,7 +55,8 @@ jobs: - name: Combine issues into mail content id: combine run: | - echo $date + echo "## Issues that have had interaction in the last 7 days
" >> mail.html + echo "$(" >> mail.html echo "## Issues that may become stale in <= 14 days
" >> mail.html echo "$(" >> mail.html echo "## Issues that have not had interaction in the last 46 days but will not go stale due to their labels
" >> mail.html