FEATURE: Allow oneboxing private GitHub repo URLs and add private indicator to HTML (#27947)

Followup 560e8aff75

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.
This commit is contained in:
Martin Brennan
2024-07-19 12:21:45 +10:00
committed by GitHub
parent 803877748d
commit f5cbc3e3b8
12 changed files with 386 additions and 17 deletions

View File

@@ -5468,6 +5468,7 @@ en:
comment_by: "Comment by"
review_by: "Review by"
pr_summary: "%{commits} commits changed %{changed_files} files with %{additions} additions and %{deletions} deletions"
no_description: "Contribute to %{repo} development by creating an account on GitHub."
discourse_push_notifications:
popup: