Auto Close Stale Issues and PRs #721
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (C) 2021-2021 Huawei Technologies Co., Ltd. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# | |
# 用于自动关闭过期issue和pr的工作流 | |
# 详情请参考 https://github.com/actions/stale | |
# | |
# @author HapThorin | |
# @date 2021/12/17 | |
# | |
name: Auto Close Stale Issues and PRs | |
on: | |
schedule: | |
# UTC/GMT+08:00 -> 北京时间凌晨4点执行 | |
- cron: "0 20 * * *" | |
jobs: | |
stale: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/stale@v4.1.0 | |
name: Auto Close Stale Issues and PRs | |
with: | |
# 为不活跃的issue添加的标签 | |
stale-issue-label: Stale | |
# issue的不活跃警告评论 | |
stale-issue-message: > | |
This issue seems to be **Stale**. We will close it in a few days. | |
# issue的关闭评论 | |
close-issue-message: > | |
We close this issue because it hasn't been updated in a while. Remove **Stale** label if you want to reopen it. | |
# issue不活跃判定时间,单位:天 | |
days-before-issue-stale: 29 | |
# issue最终关闭间隔时间,单位:天,-1不执行自动关闭 | |
days-before-issue-close: -1 | |
# 为不活跃的pr添加的标签 | |
stale-pr-label: Stale | |
# pr的不活跃警告评论 | |
stale-pr-message: > | |
This PR seems to be **Stale**. We will close it in a few days. | |
# pr的关闭评论 | |
close-pr-message: > | |
We close this PR because it hasn't been updated in a while. Remove **Stale** label if you want to reopen it. | |
# pr不活跃判定时间,单位:天 | |
days-before-pr-stale: 14 | |
# pr最终关闭间隔时间,单位:天,-1不执行自动关闭 | |
days-before-pr-close: -1 | |
# 每次运行处理issue和PR条数,如果待处理的数量过多,可修改该值 | |
operations-per-run: 100 |