# 工作流名称:关闭过时的issues和PRs name: 'Close stale issues and PRs' # 触发条件 on: workflow_dispatch: # 允许手动触发工作流 schedule: - cron: '0 6 * * *' # 定时触发,每天早上6点执行(UTC时间) jobs: stale: # 定义名为stale的任务(处理过时的issues和PRs) if: github.repository_owner == 'TryGhost' # 仅当仓库所有者为TryGhost时执行 runs-on: ubuntu-latest # 任务运行在最新版Ubuntu系统上 steps: # 使用官方的stale动作处理过时内容 - uses: actions/stale@v9 with: # 标记issue为过时的提示消息 stale-issue-message: | Our bot has automatically marked this issue as stale because there has not been any activity here in some time. The issue will be closed soon if there are no further updates, however we ask that you do not post comments to keep the issue open if you are not actively working on a PR. We keep the issue list minimal so we can keep focus on the most pressing issues. Closed issues can always be reopened if a new contributor is found. Thank you for understanding 🙂 # 标记PR为过时的提示消息 stale-pr-message: | Our bot has automatically marked this PR as stale because there has not been any activity here in some time. If we’ve missed reviewing your PR & you’re still interested in working on it, please let us know. Otherwise this PR will be closed shortly, but can always be reopened later. Thank you for understanding 🙂 # 免于标记为过时的issue标签(这些标签的issue不会被处理) exempt-issue-labels: 'feature,pinned,needs:triage' # 免于标记为过时的PR标签(这些标签的PR不会被处理) exempt-pr-labels: 'feature,pinned,needs:triage' days-before-stale: 113 # issue闲置113天后标记为过时 days-before-pr-stale: 358 # PR闲置358天后标记为过时 stale-issue-label: 'stale' # 标记过时issue时添加的标签 stale-pr-label: 'stale' # 标记过时PR时添加的标签 close-issue-reason: 'not_planned' # 关闭issue时的原因(GitHub内置选项)