From 050103be334fadc46380349baa8a2f57f0dba9de Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 29 Sep 2025 17:18:56 -0700 Subject: [PATCH] Add stale workflow --- .../issue-management-feedback-label.yml | 5 ++- .../issue-management-stale-action.yml | 39 +++++++++++++++---- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.github/workflows/issue-management-feedback-label.yml b/.github/workflows/issue-management-feedback-label.yml index 15dca38451..49db5efb55 100644 --- a/.github/workflows/issue-management-feedback-label.yml +++ b/.github/workflows/issue-management-feedback-label.yml @@ -1,4 +1,4 @@ -name: Issue management - remove needs feedback label +name: Issue management - remove labels as needed on: issue_comment: @@ -20,9 +20,10 @@ jobs: steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: Remove label + - name: Remove labels env: ISSUE_NUMBER: ${{ github.event.issue.number }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh issue edit --remove-label "needs author feedback" $ISSUE_NUMBER + gh issue edit --remove-label "stale" $ISSUE_NUMBER diff --git a/.github/workflows/issue-management-stale-action.yml b/.github/workflows/issue-management-stale-action.yml index 59f1da1455..0727d6a69a 100644 --- a/.github/workflows/issue-management-stale-action.yml +++ b/.github/workflows/issue-management-stale-action.yml @@ -4,6 +4,7 @@ on: schedule: # hourly at minute 23 - cron: "23 * * * *" + workflow_dispatch: permissions: contents: read @@ -18,15 +19,39 @@ jobs: steps: - uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 7 days-before-close: 7 only-labels: "needs author feedback" + stale-issue-label: stale stale-issue-message: > - This has been automatically marked as stale because it has been marked - as needing author feedback and has not had any activity for 7 days. - It will be closed if no further activity occurs within 7 days of this comment. + This issue has been labeled as stale due to lack of activity and needing author feedback. + It will be automatically closed if there is no further activity over the next 7 days. + stale-pr-label: stale stale-pr-message: > - This has been automatically marked as stale because it has been marked - as needing author feedback and has not had any activity for 7 days. - It will be closed if no further activity occurs within 7 days of this comment. + This PR has been labeled as stale due to lack of activity and needing author feedback. + It will be automatically closed if there is no further activity over the next 7 days. + + - uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0 + with: + days-before-stale: 365 + days-before-close: 0 + close-issue-label: stale + close-issue-message: > + Since there has been no activity on this enhancement for the past year we are closing it to help maintain our backlog. + Anyone who would like to work on it is still welcome to do so, and we can re-open it at that time. + days-before-pr-stale: -1 + days-before-pr-close: -1 + only-labels: "enhancement" + exempt-issue-labels: "stale" # so that it won't close issues labeled as stale by "needs author feedback" + + - uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0 + with: + days-before-issue-stale: -1 + days-before-issue-close: -1 + days-before-pr-stale: 90 + days-before-pr-close: 14 + stale-pr-label: stale + stale-pr-message: > + This PR has been labeled as stale due to lack of activity. + It will be automatically closed if there is no further activity over the next 14 days. + exempt-draft-pr: false