]> git.kaiwu.me - nginx.git/commitdiff
GH: mark old issues & PRs as stale
authorAndrew Clayton <a.clayton@nginx.com>
Wed, 4 Mar 2026 18:44:33 +0000 (18:44 +0000)
committerAndrew Clayton <a.clayton@nginx.com>
Fri, 24 Apr 2026 16:33:41 +0000 (17:33 +0100)
Mark issues & pull-requests that have had no activity for a specified
amount of time as stale.

.github/workflows/mark-issues-prs-stale.yaml [new file with mode: 0644]

diff --git a/.github/workflows/mark-issues-prs-stale.yaml b/.github/workflows/mark-issues-prs-stale.yaml
new file mode 100644 (file)
index 0000000..6b03535
--- /dev/null
@@ -0,0 +1,27 @@
+name: Mark Stale Issues/Pull-Requests
+
+on:
+  schedule:
+    - cron: '22 2 * * *'  # Run every day at 02:22
+
+env:
+  STALE_DAYS: 90
+
+jobs:
+  mark_stale_issues_prs:
+    runs-on: ubuntu-24.04
+    permissions:
+      actions: write
+      issues: write
+      pull-requests: write
+
+    name: Mark stale issues/pull-requests
+    steps:
+      - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10
+        with:
+          stale-pr-message: "This pull-request has been automatically marked 'stale' because it has been inactive for **${{ env.STALE_DAYS }}** days."
+          stale-issue-message: "This issue has been automatically marked 'stale' because it has been inactive for **${{ env.STALE_DAYS }}** days."
+          days-before-stale: ${{ env.STALE_DAYS }}
+          days-before-close: -1
+          stale-pr-label: stale
+          stale-issue-label: stale