Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:octocat: auto-lock closed issues/PRs after 30 days of inactivity

Danielc2b70f27058a
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 821b2a7c96..a67e58c7a6 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -92,3 +92,9 @@ Modify Go source code:
`C.size_t(len(b))` to `C.socklen_t(len(b))`
For other details, please refer to https://github.com/siyuan-note/siyuan/issues/13184
+
+## Issue workflow
+
+* Issues and pull requests that have been closed with no activity for 30 days are locked automatically to keep the tracker focused on open work.
+* If you run into a problem similar to a locked one, please open a new issue and link back to the original. Avoid replying on old, closed threads — that revives stale context and pings everyone who participated.
+* A new issue with a clear reproduction and a reference to the closed one is far easier to act on than a comment appended to a months-old thread.
diff --git a/.github/CONTRIBUTING.zh-CN.md b/.github/CONTRIBUTING.zh-CN.md
index 0054e4f0a0..6ef7518425 100644
--- a/.github/CONTRIBUTING.zh-CN.md
+++ b/.github/CONTRIBUTING.zh-CN.md
@@ -92,3 +92,9 @@ NPM 镜像:
`C.size_t(len(b))` 改为 `C.socklen_t(len(b))`
其他细节请参考 https://github.com/siyuan-note/siyuan/issues/13184
+
+## Issue 流程
+
+* 已关闭且连续 30 天无新动态的 issue 和 PR 会被自动锁定,以保持 issue 列表聚焦在尚未解决的问题上。
+* 如果你遇到的问题与某个已锁定 issue 类似,请新开一个 issue 并附上原 issue 的链接,不要在已关闭的旧 issue 下追加回复——这会让过时的上下文重新浮现,并打扰所有历史参与者。
+* 一个带有清晰复现步骤并引用原 issue 的新 issue,远比在几个月前的讨论下追加一条评论更容易被处理。
diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml
new file mode 100644
index 0000000000..07ddd3b083
--- /dev/null
+++ b/.github/workflows/lock.yml
@@ -0,0 +1,33 @@
+name: Lock closed issues and PRs
+
+on:
+ schedule:
+ - cron: "0 0 * * *" # 每天 UTC 00:00(北京时间 08:00)运行一次
+ workflow_dispatch: # 允许手动触发,便于首次启用时回扫历史
+
+permissions:
+ issues: write
+ pull-requests: write
+
+jobs:
+ lock:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: dessant/lock-threads@v6
+ with:
+ issue-inactive-days: "30"
+ issue-lock-reason: "resolved"
+ issue-comment: |
+ This issue has been automatically locked because it has been closed with no activity for 30 days.
+ 该 issue 已因关闭后 30 天无新动态被自动锁定。
+
+ If you are facing a similar problem, please open a new issue and link back to this one for context.
+ 如果你遇到类似问题,请新开一个 issue 并附上此 issue 的链接,请勿在此追加回复。
+ pr-inactive-days: "30"
+ pr-lock-reason: "resolved"
+ pr-comment: |
+ This pull request has been automatically locked because it has been closed with no activity for 30 days.
+ 该 Pull Request 已因关闭后 30 天无新动态被自动锁定。
+
+ If you wish to continue this work, please open a new issue or pull request and link back to this one.
+ 如需继续推进,请新开 issue 或 PR 并附上此链接。