Close issues #9
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-2024 Claudio André <dev at claudioandre.slmail.me> | |
# | |
# This program comes with ABSOLUTELY NO WARRANTY; express or implied. | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, as expressed in version 2, seen at | |
# http://www.gnu.org/licenses/gpl-2.0.html | |
############################################################################### | |
# GitHub Action to close old issues automatically | |
# More info at https://github.com/openwall/john-packages | |
--- | |
# Close Old Issues | |
# | |
# This Action will automatically closes issues after a given amount of time. | |
# | |
# Contributors donate free time to work on the project because they enjoy it. | |
# Discussing things that nobody cares about is not pleasant and takes a lot of time. | |
# And we can't force them to do it either. The issue will most likely remain open forever. | |
name: Close issues | |
"on": | |
schedule: | |
- cron: "30 1 * * *" | |
permissions: | |
contents: read | |
jobs: | |
close-issues: | |
runs-on: ubuntu-latest | |
name: stale | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
api.github.com:443 | |
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 | |
with: | |
days-before-issue-stale: 14 | |
days-before-issue-close: 7 | |
exempt-issue-labels: "keep open,O: backlog" | |
stale-issue-label: "O: stale" | |
stale-issue-message: | | |
"This issue is stale because it has been open for 14 days with no activity." | |
close-issue-message: | | |
"This issue was closed because it has been inactive for 7 days since being marked as stale." | |
days-before-pr-stale: 14 | |
days-before-pr-close: -1 | |
exempt-pr-labels: "keep open" | |
stale-pr-label: "O: stale" | |
stale-pr-message: | | |
"This PR is stale because it has been open for 14 days with no activity." | |
# Avoid stale for specific milestones | |
exempt-issue-milestones: "future" | |
exempt-pr-milestones: "future" | |
repo-token: ${{ secrets.GITHUB_TOKEN }} |