Skip to content

Repo cleanup (old PRs, branches and issues) #653

Repo cleanup (old PRs, branches and issues)

Repo cleanup (old PRs, branches and issues) #653

Workflow file for this run

name: Repo cleanup (old PRs, branches and issues)
on:
schedule:
- cron: "0 0 * * *"
# Allow workflow to be manually run from the GitHub UI
workflow_dispatch:
jobs:
cleanup-repository:
runs-on: ubuntu-latest
steps:
# Mark issues and PRs with no activity as stale after a while, and close them after a while longer
- uses: actions/stale@v3
with:
stale-issue-message: 'Marking issue as stale'
stale-pr-message: 'Marking PR as stale'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
days-before-stale: 30
days-before-close: 7
- uses: phpdocker-io/github-actions-delete-abandoned-branches@v2
with:
github_token: ${{ github.token }}
last_commit_age_days: 100
dry_run: no
ignore_branches: test_prefix/one,test_prefix/two,test_prefix_ignored/one