From 643eb1c2a6c6ffce5718f79d1e71166d63a13aa3 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Thu, 5 Dec 2024 20:32:40 +0100 Subject: [PATCH] CI: Configure stale bot for PRs We want to remind both contributors and maintainers that PRs should be up-to-date, reviewed and merged. Stale bot does a pretty good job of notifying the right people :^) --- .github/stale.yml | 61 ------------------------------------- .github/workflows/stale.yml | 32 +++++++++++++++++++ 2 files changed, 32 insertions(+), 61 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 46633e4233e..00000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 21 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 7 - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - "⛔ pr-is-blocked" - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: true - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: true - -# Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: false - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This pull request has been automatically marked as stale because it has not had - recent activity. It will be closed in 7 days if no further activity occurs. - Thank you for your contributions! - -# Comment to post when removing the stale label. -# unmarkComment: > -# Your comment here. - -# Comment to post when closing a stale Issue or Pull Request. -closeComment: > - This pull request has been closed because it has not had recent activity. - Feel free to re-open if you wish to still contribute these changes. - Thank you for your contributions! - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -only: pulls - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -# pulls: -# daysUntilStale: 30 -# markComment: > -# This pull request 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. - -# issues: -# exemptLabels: -# - confirmed diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000000..def0552cedf --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,32 @@ +name: 'Close stale PRs' +on: + # Run daily at 01:30. + schedule: + - cron: '30 1 * * *' + + # Allows you to run this workflow manually from the Actions tab on GitHub. + workflow_dispatch: + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + # Leave issues alone. + days-before-issue-stale: -1 + days-before-issue-close: -1 + + # PRs become stale after 21 days of inactivity. + days-before-pr-stale: 21 + stale-pr-label: stale + stale-pr-message: > + This pull request has been automatically marked as stale because it has not had recent activity. It will be + closed in 7 days if no further activity occurs. Thank you for your contributions! + + # PRs get closed after 30 days (21 + 7) of inactivity (currently disabled) + # FIXME: change to 7 days after first run + days-before-pr-close: -1 + close-pr-message: > + This pull request has been closed because it has not had recent activity. Feel free to re-open if you + wish to still contribute these changes. Thank you for your contributions!