2021-05-26 17:41:35 +08:00
|
|
|
<div class="github-row">
|
FEATURE: Allow oneboxing private GitHub repo URLs and add private indicator to HTML (#27947)
Followup 560e8aff75e4bde67bb162e8fdea52e704a19f81
The linked commit allowed oneboxing private GitHub PRs,
issues, commits, and so on, but it didn't actually allow
oneboxing the root repo e.g https://github.com/discourse/discourse-reactions
We didn't have an engine for this, we were relying on OpenGraph
tags on the HTML rendering of the page like we do with other
oneboxes.
To fix this, we needed a new github engine for repos specifically.
Also, this commit adds a `data-github-private-repo` attribute to
PR, issue, and repo onebox HTML so we have an indicator of
whether the repo was private, which can be used for theme components
and so on.
2024-07-19 10:21:45 +08:00
|
|
|
<div class="github-icon-container" title="Issue" data-github-private-repo="{{is_private}}">
|
2021-05-26 17:41:35 +08:00
|
|
|
<svg width="60" height="60" class="github-icon" viewBox="0 0 14 16" version="1.1" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="github-info-container">
|
|
|
|
<h4>
|
|
|
|
<a href="{{link}}" target="_blank" rel="noopener">{{title}}</a>
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
<div class="github-info">
|
|
|
|
<div class="date">
|
2024-01-19 22:26:06 +08:00
|
|
|
{{i18n.opened}} <span class="discourse-local-date" data-format="ll" data-date="{{created_at_date}}" data-time="{{created_at_time}}" data-timezone="UTC">{{created_at}}</span>
|
2021-05-26 17:41:35 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#closed_at}}
|
|
|
|
<div class="date">
|
2024-01-19 22:26:06 +08:00
|
|
|
{{i18n.closed}} <span class="discourse-local-date" data-format="ll" data-date="{{closed_at_date}}" data-time="{{closed_at_time}}" data-timezone="UTC">{{closed_at}}</span>
|
2021-05-26 17:41:35 +08:00
|
|
|
</div>
|
|
|
|
{{/closed_at}}
|
|
|
|
|
|
|
|
<div class="user">
|
|
|
|
<a href="{{user.html_url}}" target="_blank" rel="noopener">
|
2024-12-04 09:25:03 +08:00
|
|
|
<img alt="" src="{{user.avatar_url}}" class="onebox-avatar-inline" width="20" height="20">
|
2021-05-26 17:41:35 +08:00
|
|
|
{{user.login}}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="labels">
|
|
|
|
{{#labels}}
|
2021-06-26 01:48:36 +08:00
|
|
|
<span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
|
|
|
|
{{{name}}}
|
|
|
|
</span>
|
2021-05-26 17:41:35 +08:00
|
|
|
{{/labels}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{> github/github_body}}
|