4
0
Эх сурвалжийг харах

Mark issues stale after 30 days without activity and close them 3 days later (#488)

* Mark issues stale after 60 days without activity and close them 14 days later

* Mark issues stale after 30 days instead of 60

* Close stale issues after 3 days instead of 14

* Leave the stale label alone on pull requests
Bernt Christian Egeland 19 цаг өмнө
parent
commit
18f2d976e3

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

@@ -0,0 +1,42 @@
+name: Stale issues
+
+# Marks an issue stale after 30 days without activity and closes it 3 days
+# later unless someone comments. Pull requests are left alone. An issue that
+# is assigned, in a milestone, or labelled pinned, help wanted or good first
+# issue is never marked.
+
+on:
+  schedule:
+    - cron: '30 1 * * *'
+  workflow_dispatch:
+
+permissions:
+  actions: write
+  issues: write
+  pull-requests: read
+
+jobs:
+  stale:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/stale@v11
+        with:
+          days-before-issue-stale: 30
+          days-before-issue-close: 3
+          days-before-pr-stale: -1
+          days-before-pr-close: -1
+          # Without this a pull request someone labelled stale by hand would
+          # still have the label taken off when it is updated.
+          remove-pr-stale-when-updated: false
+          stale-issue-label: stale
+          exempt-issue-labels: pinned,help wanted,good first issue
+          exempt-all-issue-milestones: true
+          exempt-all-issue-assignees: true
+          stale-issue-message: >
+            This issue has had no activity for 30 days, so it is marked stale.
+            It will be closed in 3 days unless there is new activity. Comment
+            if it still matters and it stays open.
+          close-issue-message: >
+            Closed after 3 more days without activity. Reopen it, or open a
+            new issue, if it still matters.
+          close-issue-reason: not_planned