Skip to content

Commit

Permalink
github-actions: warn and auto-close issues & prs (raspibolt#833)
Browse files Browse the repository at this point in the history
* github-actions: warn and auto-close issues & prs

Support is given on a best-effort basis. In my experience, issues
quickly become irrelevant and even if help is finally provided
with some delay, the original author no longer comes back.

The same goes for pull requests that don't gain any traction. They
become outdated, although on a longer time scale.

To keep open issues and pull requests relevant, it's good practice
to close stale ones. GitHub actions provides a bot that does this
automatically, giving a warning first (marking the item as 'stale'),
and then automatically closes it later.

This change proposes to mark issues as stale after 60 days of
inactivity, and close them one week after, if no activity occurs.

Pull requests are marked as stale after 90 days without any
interaction, and automatically closed 30 days later in case of
inactivity.

* fix: 30 days after stale for pr
  • Loading branch information
Stadicus authored Dec 10, 2021
1 parent 2fda91e commit ecd6be7
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests

on:
schedule:
- cron: '31 * * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 60
days-before-issue-close: 7
stale-issue-message: 'This issue is marked as `stale` because there was no activity for 60 days. If the issue stays inactive, it will be closed in a week.'
stale-issue-label: 'stale'
close-issue-message: 'This issue has been closed due to inactivity.'

days-before-pr-stale: 90
days-before-pr-close: 30
stale-pr-message: 'This pull request is marked as `stale` because there was no activity for 90 days. If the pull request stays inactive, it will be closed automatically in 30 days.'
stale-pr-label: 'stale'
close-pr-message: 'This pull request has been closed due to inactivity.'

0 comments on commit ecd6be7

Please sign in to comment.