V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
helloqiuqiuqiu

自动 close issue 的 GitHub App

  •  
  •   helloqiuqiuqiu ·
    helloqiu · Jul 4, 2018 · 2029 views
    This topic created in 2856 days ago, the information mentioned may be changed or developed.

    在管理自己的 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

    weishu
        1
    weishu  
       Jul 4, 2018
    非常需要,先表示感谢,然后试用一下;回来给评价!
    weishu
        2
    weishu  
       Jul 4, 2018
    @weishu 测试了一下,使用正常;能满足基本需求。已 star ~

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

    测试地址:
    https://github.com/android-hacker/VirtualXposed/issues/297
    https://github.com/android-hacker/VirtualXposed/issues/296
    helloqiuqiuqiu
        3
    helloqiuqiuqiu  
    OP
       Jul 4, 2018   ❤️ 1
    @weishu 后续应该会支持~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1439 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 126ms · UTC 16:56 · PVG 00:56 · LAX 09:56 · JFK 12:56
    ♥ Do have faith in what you're doing.