在issues反馈区添加自动化bot,用于给issues打标签和自动关闭
Problem
每个issues都可能会有不同的需求,如加功能,更新东西等等 但是挨个看issues实在使人厌烦
Proposed solution
众所周知,自动化bot可以省很多事情。 加个自动化bot,对于友好的issues,可以给它自动打一些标签,如feat,优先级低,优先级高等等 就算面对某些不友好的issues(指到issues区发广告的),也能直接自动关闭
Alternatives considered
暂无
Additional context
部分开源仓库真的遇到了被广告攻占的问题
英文版
Problem
Every issue may have different requirements, such as adding features, updating things, etc. But going through issues one by one is really annoying.
Proposed solution
As we all know, automation bots can save a lot of effort. Add an automation bot that can automatically add tags to friendly issues, such as feat, priority: low, priority: high, etc. Even for unfriendly issues (e.g., advertisements posted in the issue section), the bot can directly close them.
Alternatives considered
None so far.
Additional context
Some open-source repositories have indeed been overrun by advertisement spam.
我知道这可能想的比较远,但是未雨绸缪总是好的 I know this might be thinking a bit too far ahead, but it's always good to prepare for a rainy day.
Good idea — GitHub Actions can handle this with zero external dependencies. Two ready-to-drop workflows:
1. Auto-label by keyword (.github/workflows/label-issues.yml)
name: Label Issues
on:
issues:
types: [opened, edited]
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Pair with .github/labeler.yml:
bug:
- any: ['*bug*', '*crash*', '*error*', '*broken*']
enhancement:
- any: ['*feature*', '*request*', '*improve*', '*add*']
question:
- any: ['*how*', '*why*', '*what*', '*?*']
2. Auto-close stale issues (.github/workflows/stale.yml)
name: Stale Issues
on:
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue has been inactive for 60 days and will be closed in 7 days unless there is new activity.'
days-before-stale: 60
days-before-close: 7
exempt-issue-labels: 'pinned,security'
Both workflows are free, use official GitHub Actions, and need no external tokens or servers. Happy to open a PR with these if you'd like.
感谢建议。这个方向很有价值,尤其是现在 issue/PR 量上来以后;但我不想让 bot 自动关闭正常社区反馈,也不会直接复制评论里的 workflow 片段进仓库。
更合适的范围是 v0.8.48 presence/community front door: 先做安全的自动标签/去重/提醒,再由维护者确认关闭策略。Moving out of v0.8.42 and keeping it open as issue-intake tooling.
Closing as shipped — automated issue workflows exist: .github/workflows/triage.yml, auto-tag.yml, stale.yml, plus the contribution gate. Thanks for the early push for this.