Close Inactive Issues #31
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) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | |
# Copyright (c) 2023 Contributors to the Eclipse Foundation | |
# | |
# See the NOTICE file(s) distributed with this work for additional | |
# information regarding copyright ownership. | |
# | |
# This program and the accompanying materials are made available under the | |
# terms of the Apache License, Version 2.0 which is available at | |
# https://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. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
################################################################################# | |
--- | |
name: Close Inactive Issues | |
on: | |
schedule: | |
- cron: "30 1 * * *" # once a day (1:30 UTC) | |
workflow_dispatch: # allow manual trigger | |
jobs: | |
close-issues-in-triage: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- uses: actions/stale@v9 | |
with: | |
operations-per-run: 1000 | |
days-before-issue-stale: 32 # 4 weeks | |
days-before-issue-close: 14 | |
stale-issue-label: "stale" | |
stale-issue-message: "This issue is stale because it has been open for 4 weeks with no activity." | |
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." | |
close-issue-reason: 'not_planned' | |
days-before-pr-stale: -1 # ignore PRs (overwrite default days-before-stale) | |
days-before-pr-close: -1 # ignore PRs (overwrite default days-before-close) | |
remove-issue-stale-when-updated: true | |
only-labels: 'triage' | |
repo-token: ${{ github.token }} | |
close-issues-with-assignee: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- uses: actions/stale@v9 | |
with: | |
operations-per-run: 1000 | |
days-before-issue-stale: 32 | |
days-before-issue-close: 7 | |
stale-issue-label: "stale" | |
stale-issue-message: "This issue is stale because it has been open for 4 weeks with no activity." | |
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale." | |
close-issue-reason: 'not_planned' | |
days-before-pr-stale: -1 # ignore PRs (overwrite default days-before-stale) | |
days-before-pr-close: -1 # ignore PRs (overwrite default days-before-close) | |
remove-issue-stale-when-updated: true | |
exempt-issue-labels: bug # ignore issues labelled as bug | |
repo-token: ${{ github.token }} | |
close-issues-without-assignee: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- uses: actions/stale@v9 | |
with: | |
operations-per-run: 1000 | |
days-before-issue-stale: 14 | |
days-before-issue-close: 7 | |
stale-issue-label: "stale" | |
stale-issue-message: "This issue is stale because it has been open for 2 weeks with no activity." | |
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale." | |
close-issue-reason: 'not_planned' | |
days-before-pr-stale: -1 # ignore PRs (overwrite default days-before-stale) | |
days-before-pr-close: -1 # ignore PRs (overwrite default days-before-close) | |
remove-issue-stale-when-updated: true | |
exempt-all-issue-assignees: true # issues with assignees will be ignored | |
exempt-issue-labels: bug,triage # ignore issues labelled as bug or triage | |
repo-token: ${{ github.token }} | |
close-inactive-pull-requests: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: actions/stale@v9 | |
with: | |
operations-per-run: 1000 | |
days-before-issue-stale: -1 # ignore issues (overwrite default days-before-stale) | |
days-before-issue-close: -1 # ignore issues (overwrite default days-before-close) | |
stale-pr-label: "stale" | |
stale-pr-message: "This pull request is stale because it has been open for 7 days with no activity." | |
close-pr-message: "This pull request was closed because it has been inactive for 7 days since being marked as stale." | |
days-before-pr-stale: 7 | |
days-before-pr-close: 7 | |
remove-pr-stale-when-updated: true | |
repo-token: ${{ github.token }} |