diff --git a/.github/workflows/stale-branches.yml b/.github/workflows/stale-branches.yml new file mode 100644 index 0000000..ee24933 --- /dev/null +++ b/.github/workflows/stale-branches.yml @@ -0,0 +1,39 @@ +name: Stale Branches/PRs + +on: + schedule: + - cron: '30 1 * * *' + +permissions: + issues: write + contents: write + pull-requests: write + +jobs: + stale_branches: + runs-on: ubuntu-latest + steps: + - name: Stale Branches + uses: gamechanger/stale-branches@v3.0.0 + with: + repo-token: '${{ secrets.GITHUB_TOKEN }}' + days-before-stale: 45 + days-before-delete: 60 + comment-updates: false + max-issues: 200 + tag-committer: true + stale-branch-label: 'stale branch 🗑️' + compare-branches: 'info' + branches-filter-regex: '^(?!(dependabot|LTS))' + stale_prs: + runs-on: ubuntu-latest + steps: + - name: Stale PRs + uses: actions/stale@v8 + with: + stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.' + close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.' + days-before-pr-stale: 30 + days-before-pr-close: 7 + stale-pr-label: 'no-pr-activity' + exempt-pr-labels: 'awaiting-approval,work-in-progress,dependencies'