From 4d091517e7982c6c555562fafe8e5fb3c8757f39 Mon Sep 17 00:00:00 2001 From: Sam Clark <3758302+goatgoose@users.noreply.github.com> Date: Tue, 11 Apr 2023 11:45:04 -0400 Subject: [PATCH] Add github stale action --- .github/stale.yml | 23 ----------------------- .github/workflows/stale.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 23 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 58080e31bb2..00000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,23 +0,0 @@ -# See Docs at https://github.com/probot/stale -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 60 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 -# Issues with these labels will never be considered stale -exemptLabels: - - ops-backlog - - status/needs_team_discussion - - status/on_hold -# Label to use when marking an issue as stale -staleLabel: status/stale -# Number of actions per hour -limitPerRun: 10 -# Limit to only `issues` or `pulls` -only: pulls -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000000..89256ac74b5 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,33 @@ +name: Close stale PRs +on: + schedule: + - cron: "30 1 * * *" + pull_request: + paths: [.github/workflows/stale.yml] + branches: [main] + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/stale@v8 + with: + stale-pr-message: > + This PR has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + days-before-pr-stale: 60 + days-before-pr-close: 7 + days-before-issue-stale: -1 + days-before-issue-close: -1 + exempt-pr-labels: ops-backlog,status/needs_team_discussion,status/on_hold + stale-pr-label: status/stale + + # Perform a dry-run if the workflow was changed in a PR + debug-only: ${{ github.event_name == 'pull_request' }} + + # The github API rate limit isn't as much of a concern in debug mode. See + # https://github.com/actions/stale#debugging. + operations-per-run: ${{ github.event_name == 'pull_request' && 100 || 30 }}