Skip to content

🗂️ Close Inactive Issues #133

🗂️ Close Inactive Issues

🗂️ Close Inactive Issues #133

Workflow file for this run

name: 🗂️ Close Inactive Issues
on:
workflow_dispatch:
inputs:
days-before-issue-stale:
description: "Days before marking an issue as stale"
required: false
default: "60"
days-before-issue-close:
description: "Days before closing a stale issue"
required: false
default: "60"
schedule:
- cron: "30 1 * * *" # Runs daily at 1:30 AM UTC
permissions:
issues: write
pull-requests: read # Read-only to avoid unintended PR actions
jobs:
close-inactive-issues:
name: 🚀 Close Inactive Issues
runs-on: ubuntu-latest
steps:
- name: 🔍 Run Stale Action
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Issue Configuration
days-before-issue-stale: ${{ github.event.inputs.days-before-issue-stale || 60 }}
days-before-issue-close: ${{ github.event.inputs.days-before-issue-close || 60 }}
stale-issue-label: "stale"
exempt-issue-labels: "pinned,important,discussion" # Protect important issues
stale-issue-message: |
⚠️ This issue has been marked as **stale** because it has been open for **${{ github.event.inputs.days-before-issue-stale || 60 }} days** with no activity.
If this issue is still relevant, please comment to keep it active. Otherwise, it will be closed in **${{ github.event.inputs.days-before-issue-close || 60 }} days**.
close-issue-message: |
❌ This issue has been **closed** because it remained inactive for **${{ github.event.inputs.days-before-issue-close || 60 }} days** after being marked as stale.
# PR Configuration (Disabling PR handling explicitly)
days-before-pr-stale: -1
days-before-pr-close: -1