From 708dfebac29754be652fc75afb8f5b920d63d960 Mon Sep 17 00:00:00 2001 From: Jia Liu Date: Fri, 15 Aug 2025 17:31:53 +0800 Subject: [PATCH 1/2] add workflow: auto_close_issue --- .github/workflows/auto_close_issue.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/auto_close_issue.yml diff --git a/.github/workflows/auto_close_issue.yml b/.github/workflows/auto_close_issue.yml new file mode 100644 index 000000000..2f88170c1 --- /dev/null +++ b/.github/workflows/auto_close_issue.yml @@ -0,0 +1,22 @@ +name: Close inactive issues +on: + schedule: + - cron: "0 16 * * *" + +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-issue-close: 60 + stale-issue-label: "stale" + stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." + close-issue-message: "This issue was closed because it has been inactive for 60 days since being marked as stale." + days-before-pr-stale: -1 + days-before-pr-close: -1 + repo-token: ${{ secrets.GITHUB_TOKEN }} From 7cb120af845fee402f54b4f44910c9feb833bb65 Mon Sep 17 00:00:00 2001 From: Jia Liu Date: Mon, 18 Aug 2025 17:01:40 +0800 Subject: [PATCH 2/2] update workflow --- .github/workflows/auto_close_issue.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/auto_close_issue.yml b/.github/workflows/auto_close_issue.yml index 2f88170c1..ef6a5fda9 100644 --- a/.github/workflows/auto_close_issue.yml +++ b/.github/workflows/auto_close_issue.yml @@ -12,6 +12,7 @@ jobs: steps: - uses: actions/stale@v9 with: + debug-only: true days-before-issue-stale: 30 days-before-issue-close: 60 stale-issue-label: "stale" @@ -19,4 +20,5 @@ jobs: close-issue-message: "This issue was closed because it has been inactive for 60 days since being marked as stale." days-before-pr-stale: -1 days-before-pr-close: -1 + exempt-labels: "help wanted, good first issue, bug, enhancement" repo-token: ${{ secrets.GITHUB_TOKEN }}