Просмотр исходного кода

Add workflow to automatically close stale issues and PRs

Introduced a new GitHub workflow that automatically flags and closes stale issues and PRs. This GitHub Action runs on a schedule (every hour) and works by marking inactive pull requests as stale after 14 days of inactivity, and subsequently closing them if there's still no activity after an additional 14 days. The PRs to be exempted from this workflow are also specified.
DerSkythe 2 лет назад
Родитель
Сommit
7bb0680368
1 измененных файлов с 21 добавлено и 0 удалено
  1. 21 0
      .github/workflows/stale.yml

+ 21 - 0
.github/workflows/stale.yml

@@ -0,0 +1,21 @@
+name: "Close stale issues and PRs"
+on:
+  schedule:
+    - cron: "* 0 * * *"
+
+jobs:
+  stale:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/stale@v8
+        with:
+          days-before-stale: -1
+          days-before-close: -1
+          stale-pr-message: "This pull request is stale because it has been open 14 days with no activity. To keep this pull request open remove stale label or comment."
+          stale-pr-label: "status:stale"
+          close-pr-message: "This pull request was closed because it has been stale for 14 days with no activity. If this pull request is important or you have more to add feel free to re-open it."
+          days-before-pr-stale: 14
+          days-before-pr-close: 14
+          exempt-issue-labels: "needs:attention,needs:triage,blocked"
+          ascending: true # https://github.com/actions/stale#ascending
+          operations-per-run: 500