mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
name: Stale Issue and Branch Cleanup
|
|
on:
|
|
schedule:
|
|
# Every day at midnight
|
|
- cron: "0 0 * * *"
|
|
workflow_dispatch:
|
|
jobs:
|
|
issues:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
issues: write
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/stale@v8.0.0
|
|
with:
|
|
stale-issue-label: "stale"
|
|
stale-pr-label: "stale"
|
|
days-before-stale: 90
|
|
# Pull Requests become stale more quickly due to merge conflicts.
|
|
# Also, we promote minimizing WIP.
|
|
days-before-pr-stale: 7
|
|
days-before-pr-close: 3
|
|
# We rarely take action in response to the message, so avoid
|
|
# cluttering the issue and just close the oldies.
|
|
stale-pr-message: ""
|
|
stale-issue-message: ""
|
|
# Upped from 30 since we have a big tracker and was hitting the limit.
|
|
operations-per-run: 60
|
|
# Start with the oldest issues, always.
|
|
ascending: true
|
|
branches:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Run delete-old-branches-action
|
|
uses: beatlabs/delete-old-branches-action@v0.0.10
|
|
with:
|
|
repo_token: ${{ github.token }}
|
|
date: "6 months ago"
|
|
dry_run: false
|
|
delete_tags: false
|
|
# extra_protected_branch_regex: ^(foo|bar)$
|
|
exclude_open_pr_branches: true
|