Skip to content

Close inactive issues #45

Close inactive issues

Close inactive issues #45

# see https://docs.github.com/en/actions/managing-issues-and-pull-requests/closing-inactive-issues
# see https://github.com/actions/stale
# Automatically closing issues is far from perfect, but then we only
# have limited resources and this approach favors issues that people
# actually care about.
#
# also see:
# "Should I Stale or Should I Close? An Analysis of a Bot that Closes
# Abandoned Issues and Pull Request".
# https://igorwiese.com/images/papers/Paper_BotSE_19.pdf
name: 'Close inactive issues'
on:
schedule:
- cron: "30 6 * * 4"
workflow_dispatch:
jobs:
close-issues:
name: 'Close inactive issues'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v7
with:
exempt-all-milestones: true
exempt-issue-labels: 'blocker,enhancement,regression'
days-before-stale: 60
days-before-close: 30
stale-issue-label: "stale"
stale-pr-label: "stale"
ignore-updates: true
remove-stale-when-updated: false
stale-issue-message: '这个问题是**陈旧的**因为它已经开放了60天而没有活动。请删除`stale`标签或添加评论,否则这个问题将在30天内被关闭。'
stale-pr-message: '这个PR是**陈旧的**因为它已经开放了60天而没有任何活动。请删除`stale`标签或添加评论,否则该PR将在30天内被关闭。'
close-issue-message: '这个问题被关闭是因为它已经停滞了30天而没有任何活动。请随时重新开放。'
close-pr-message: '这个PR被关闭是因为它已经停滞了30天而没有任何活动。请随时重新开放。'
repo-token: ${{ secrets.BOT_TOKEN }}