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:
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 document Perform check on document:
「いいね!」 23
sam
(Sam Saffron)
2019 年 10 月 14 日午前 1:52
2
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
nathank
(Nathan Kershaw)
2023 年 5 月 10 日午後 6:30
3
github プラグインは現在これを行いますが、それともこのテーマコンポーネントはまだ必要ですか?
david
(David Taylor)
2023 年 5 月 10 日午後 8:49
4
これはまだ別のテーマコンポーネントです。サードパーティの shields.io サービスに依存しているため、そのまま discourse-GitHub プラグインに移動したくはないと思います。
同様の機能を独自にゼロから実装することは可能ですが、かなり複雑です(特に GitHub の API レート制限を考慮すると)。
「いいね!」 2
sunjam
(james.network)
2023 年 9 月 20 日午後 3:16
5
Shieldsをセルフホストして使用できますか?クリエイティブ・コモンズ 0 パブリックドメインライセンスで誰でもサービスをセルフホストできます。
Dockerイメージはこちらです: https://registry.hub.docker.com/r/shieldsio/shields/
「いいね!」 1
simon
2023 年 9 月 21 日午後 7:46
6
上記の議論は、このテーマコンポーネントの機能を Discourse のコアコードに追加したくないということだったと思います。その理由は、技術的にユーザーの IP アドレスが shield.io に漏洩するためです。そのため、これはテーマコンポーネントであり、コアコードの一部ではありません。
ホストされているサイトでもセルフホストされているサイトでも、どのサイトでも使用できます。
「いいね!」 1
sunjam
(james.network)
2023 年 9 月 21 日午後 9:19
7
Shieldsはセルフホストできるので混乱しています。その場合、セルフホストされたインスタレーションにリダイレクトされるため、IPはshield.ioに漏洩しないのではないでしょうか?
「いいね!」 1
simon
2023 年 9 月 21 日午後 9:24
8
なるほど。問題は、Discourse のサイト設定に shields url を追加したくないということだと思います。自己ホストされた Shields インストールでこのテーマコンポーネントを使用したい場合は、この行を img.shields.io の代わりにインストールを指すように編集する必要があると思います。
);
if (!parts) {
return;
}
let linkType = parts[3];
if (linkType === "pull") {
linkType = "pulls";
}
const imageSrc = `https://img.shields.io/github/${linkType}/detail/state/${parts[1]}/${parts[2]}/${parts[4]}?label=&style=flat-square`;
const image = document.createElement("img");
image.setAttribute("src", imageSrc);
image.classList.add("github-status-indicator");
const info = onebox.querySelector(".github-info");
if (info) {
info.appendChild(image);
}
});
},
「いいね!」 1
david
(David Taylor)
2023 年 9 月 21 日午後 11:16
9
デフォルトがimg.shields.ioのままである限り、サーバーURLのテーマ設定を追加することは、pr-welcome だと思います。
「いいね!」 2