# Discourse-github 插件不允许我设置组织范围的徽章仓库

**URL:** https://meta.discourse.org/t/discourse-github-plugin-not-letting-me-set-org-wide-badge-repositories/155288
**Category:** Feature
**Created:** [2020 年6 月 18 日 23:51 UTC](https://meta.discourse.org/t/discourse-github-plugin-not-letting-me-set-org-wide-badge-repositories/155288 "2020-06-18T23:51:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### 作者： ![jspaleta.sensu.io](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jspaleta.sensu.io/32/184467_2.png) [@jspaleta.sensu.io](https://meta.discourse.org/u/jspaleta.sensu.io)
#### 发布日期： [2020 年6 月 18 日 23:51 UTC](https://meta.discourse.org/t/discourse-github-plugin-not-letting-me-set-org-wide-badge-repositories/155288/1 "2020-06-18T23:51:48Z")

</div>

你好，  
**问题**  
我正在寻找一种好的方法，让 Discourse GitHub 插件能够为 GitHub 组织中所有仓库的贡献提供徽章。或者，如果可能的话，使用正则表达式模式来匹配仓库，但这似乎不可行。该插件的链接回传部分允许使用组织范围的通配符，但徽章集成却不支持。

目前看来，我必须单独列出每个仓库，这对于拥有 100 多个仓库的 sensu-plugins 组织来说并不现实。

**所需的最小可行增强**  
以下是我想要实现的一个示例。  
我希望能够为 sensu-plugins 下所有仓库的所有贡献设置徽章，但徽章集成不支持 `sensu-plugins/*`。这将使徽章功能与当前链接回传功能保持一致。

**更理想的灵活增强**  
更进一步，理想情况下，我希望能够仅匹配以 sensu-plugin\* 命名规范开头的插件，例如使用正则表达式模式 `^sensu-plugins/sensu-plugin` 或前缀通配符 `sensu-plugins/sensu-plugin*` 来匹配 GitHub 仓库 URL。

---

<div class="post-metadata">

### 作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### 发布日期： [2020 年6 月 23 日 06:11 UTC](https://meta.discourse.org/t/discourse-github-plugin-not-letting-me-set-org-wide-badge-repositories/155288/2 "2020-06-23T06:11:23Z")

</div>

这确实是个有趣的想法，我支持对 discourse-github 进行修改，使其能够配置大量仓库。不过需要注意的是，我们会克隆所有这些仓库，这可能会产生不小的流量。要在这一规模下实现高效运行，必须配置 Webhooks。
