Skip to content

Close stale issues and PRs #707

Close stale issues and PRs

Close stale issues and PRs #707

# Copyright 2024 Ian Lewis
#
# 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.
name: "Close stale issues and PRs"
on:
schedule:
- cron: "30 1 * * *"
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
stale:
name: Close stale issues and PRs
runs-on: ubuntu-latest
permissions:
issues: write # Needed to label and write comments on issues.
pull-requests: write # Needed to label and write comments on PRs.
steps:
- uses: actions/stale@1e223db275d687790206a7acac4d1a11bd6fe629 # v10.4.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "A friendly reminder that this issue had no activity for 120 days."
stale-pr-message: "A friendly reminder that this PR had no activity for 120 days."
stale-issue-label: "stale"
stale-pr-label: "stale"
days-before-stale: 120
days-before-close: 90
# If an issue or PR is updated after being marked as stale, it will be
# removed from the stale state and the process will start over. This
# prevents issues and PRs from being closed if they are actively being
# worked on.
remove-stale-when-updated: true
# Exempt all issues or PRs with milestones, as they are likely being
# actively planned.
exempt-all-milestones: true
exempt-pr-labels: "no-auto-close"
exempt-issue-labels: "no-auto-close,enhancement,good first issue,help wanted"
operations-per-run: 1000
close-issue-label: "auto-closed"
close-pr-label: "auto-closed"
close-issue-message: "This issue has been closed due to lack of activity."
close-pr-message: "This PR has been closed due to lack of activity."