自动 close issue 的 GitHub App

2018-07-04 00:09:20 +08:00
 helloqiuqiuqiu

在管理自己的 repo 时,你是否发现会有某些用户提出的 issue 低质或表述不清,又或者你为了改善这一现象提供了 issue template,却还是有用户将之忽视?
在这种时候,你是否期待着能把这些 issue 自动关闭 的功能?
对于不规范 issue 的管理是十分必要的,因为这样做可以减少维护者的精力,且很多出名的项目已经在这么做了,比如 vue 的 issue bot
所以我们创建了一个这样的 Github App: https://probot.github.io/apps/close-issue/

App 整体使用了 TypeScriptProbot,这也是我第一次使用 TypeScript 写 node 的应用。

为了使用这个 App,你只需要在 repo 加入一个配置文件,比如这样:

comment: "This issue is closed because it does not meet our issue template. Please read it."
issueConfigs:
- content:
# Example 1: bug report
  - "Expected Behavior"
  - "Current Behavior"
  - "Steps to Reproduce"
  - "Detailed Description"
- content:
# Example 2: feature request
  - "Motivation / Use Case"
  - "Expected Behavior"
  - "Other Information"

通过配置文件设定了关键词之后,如果新提出的 issue 没有包含一个 content 内的所有关键词,那么我们的 App 就会帮你自动 close 掉这个 issue,并作出设定的评论。 经过我的不断努力,我把它安利进了 probot 的展示页面,虽然目前排在最后一个 QAQ
所以在这里安利给需要的人,如果觉得有帮助也可以点个 star~
https://github.com/offu/close-issue-app

1611 次点击
所在节点    分享创造
3 条回复
weishu
2018-07-04 16:57:51 +08:00
非常需要,先表示感谢,然后试用一下;回来给评价!
weishu
2018-07-04 17:19:20 +08:00
@weishu 测试了一下,使用正常;能满足基本需求。已 star ~

PS: 能否 close 的时候加个 label?

测试地址:
https://github.com/android-hacker/VirtualXposed/issues/297
https://github.com/android-hacker/VirtualXposed/issues/296
helloqiuqiuqiu
2018-07-04 21:42:19 +08:00
@weishu 后续应该会支持~

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/467941

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX