From 0d7749e17b2e6e65721b145d9bcbd49a8ecabf95 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 14 Mar 2025 17:11:57 +0800 Subject: [PATCH] Add GitHub Action to check and close stale issues and PRs Signed-off-by: Sun, Xuehao --- .../workflows/daily_check_issue_and_pr.yml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/daily_check_issue_and_pr.yml diff --git a/.github/workflows/daily_check_issue_and_pr.yml b/.github/workflows/daily_check_issue_and_pr.yml new file mode 100644 index 00000000..4664b250 --- /dev/null +++ b/.github/workflows/daily_check_issue_and_pr.yml @@ -0,0 +1,28 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +name: Check stale issue and pr + +on: + schedule: + - cron: "30 22 * * *" + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v9 + with: + days-before-issue-stale: 30 + days-before-pr-stale: 30 + days-before-issue-close: 7 + days-before-pr-close: 7 + stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days." + stale-pr-message: "This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days." + close-issue-message: "This issue was closed because it has been stalled for 7 days with no activity." + close-pr-message: "This PR was closed because it has been stalled for 7 days with no activity." + repo-token: ${{ secrets.ACTION_TOKEN }} + start-date: "2025-03-01T00:00:00Z"