From ae659104aa384032fcb18b0452d1b541e3a8dcb3 Mon Sep 17 00:00:00 2001 From: Masoud Fallahpourbaee Date: Fri, 17 Jan 2025 14:41:30 +0100 Subject: [PATCH] Add a new GitHub action to mark and close stale issues and PRs --- .github/workflows/close_inactive_issues.yml | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/close_inactive_issues.yml diff --git a/.github/workflows/close_inactive_issues.yml b/.github/workflows/close_inactive_issues.yml new file mode 100644 index 0000000..3bc85da --- /dev/null +++ b/.github/workflows/close_inactive_issues.yml @@ -0,0 +1,25 @@ +name: Close inactive issues +on: + schedule: + - cron: "0 9 * * *" # Runs at 09:00 UTC every day + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v5 + with: + days-before-issue-stale: 21 + days-before-issue-close: 7 + stale-issue-label: "stale" + stale-issue-message: "This issue is marked as stale because it has been open for 21 days with no activity." + close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen the issue if it hasn't been addressed and is recurring." + days-before-pr-stale: 21 + days-before-pr-close: 7 + stale-pr-label: "stale" + stale-pr-message: "This pull request is marked as stale because it has been open for 21 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." + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file