Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action for Automating Inactive Issue Cleaning #188

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/close_inactive_issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This action will run every day at 5:00am EST
# If an issue has had no activity (comments) in 90-days, it will add the tag 'stale' and and comment to notify of the status.
# If an issue that has been marked stale is inactive for an additional 90-days, it will close the issue.

# Note: You must set the GitHub Repository Secret STALE_PAT to a Personal Access Token (PAT) that allows the stale workflow to authenticate and perform API calls to GitHub.

# Ref: https://docs.github.com/en/actions/managing-issues-and-pull-requests/closing-inactive-issues

name: Tag Stale and Close Inactive
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 90
days-before-issue-close: 90
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 90 days."
close-issue-message: "This issue was closed because it has been inactive for 90 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.STALE_PAT }}