GitHub 状态指示器

:discourse2: Summary GitHub Status Indicators adds status indicators to GitHub oneboxes for issues and pull requests. Live information is provided by https://shields.io.
:eyeglasses: Preview Preview on Discourse Theme Creator
:hammer_and_wrench: Repository Link https://github.com/discourse/github-status-theme
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Features

GitHub Status Indicators adds status indicators to GitHub oneboxes for issues and pull requests. Live information is provided by https://shields.io.

For example:


:discourse2: Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.

Last edited by @JammyDodger 2024-06-12T18:39:37Z

Check documentPerform check on document:
23 个赞

I agree with the call of not including this in core onebox, it does technically leak user IP addresses to shield.io.

I do love how it looks though. I wonder if discourse-github should take care of this long term, problem though is that there is enormous amount of work in making this work just right, so for now … the component is good.

10 个赞

github 插件现在可以做到这一点了吗,还是仍然需要这个主题组件?

这仍然是一个独立的主题组件。它依赖于第三方 shields.io 服务,因此我认为我们不希望将其原样移入 discourse-GitHub 插件。

从头开始实现类似功能是可能的,但这相当复杂(特别是考虑到 GitHub 的 API 速率限制)。

2 个赞

可以与自托管的 Shields 一起使用吗?它们允许任何人使用知识共享 0 公共领域许可来托管自己的服务。

这是 Docker 镜像 https://registry.hub.docker.com/r/shieldsio/shields/

1 个赞

我认为上面的讨论是关于不希望将此主题组件的功能添加到 Discourse 核心代码中。这样做的原因是它会在技术上将用户的 IP 地址泄露给 shield.io。这就是为什么这是一个主题组件而不是核心代码的一部分。

它可以用于任何站点,无论是托管的还是自托管的:

1 个赞

我很困惑,因为 Shields 可以自托管。在这种情况下,IP 不会泄露给 shield.io,因为它会被定向到自托管的安装吗?

1 个赞

这说得通。我想问题在于不想在 Discourse 的站点设置中添加 shields url。如果你想将此主题组件与自托管的 Shields 安装一起使用,我认为你只需要编辑这一行,将其指向你的安装,而不是 img.shields.io

1 个赞

我认为只要默认值保持为 img.shields.io,为服务器 URL 添加一个主题设置将会是 pr-welcome :+1:

2 个赞