discourse/plugins/discourse-github/config/locales/server.en.yml
Régis Hanol f3680621bc
FEATURE: GitHub PR live status icon (#36313)
I wanted a better way to show a live/up-to-date status of a PR than what
the https://github.com/discourse/github-status-theme provided.

First, I wanted it to work on any PR, including ones in private
repositories.

Second, I wanted to include the approved status, which requires a 2nd
call to GitHub's API.

Third, I wanted something that was less "intrusive" than the
"shield-like" status, so I opted out to use the icons & color that
GitHub uses (but maybe that's a bad idea).

After a first PoC that was a dump proxy to handle authentication for private repositories, the idea to use org webhooks was raised and turned out to be much lighter and easier than figuring out a proper caching strategy.

So this adds support for receiving `pull_request` and `pull_request_review` webhooks events to schedule a background job that will rebake posts and chat messages that have a link to the mentioned PR.

The GitHub PR onebox has been updated to query and parse the review state so we can have a better icon.

This also adds the `Chat::MessageLink` model (that is the #chat version of `TopicLink`) to help better keep track of links posted in chat.

**BEFORE**

<img width="1525" height="1356" alt="BEFORE"
src="https://github.com/user-attachments/assets/02f66137-9f4f-4a91-b321-73816161e204"
/>


**AFTER**

<img width="1525" height="1356" alt="AFTER"
src="https://github.com/user-attachments/assets/2164b7ef-8cd0-4cec-aea8-936a76a94fb2"
/>


Internal ref - t/17138
2025-12-04 21:42:44 +01:00

61 lines
3.7 KiB
YAML
Vendored

en:
site_settings:
enable_discourse_github_plugin: "Enable the discourse-github plugin"
github_linkback_enabled: "Link GitHub issues back to forum discussions"
github_linkback_projects: "List of projects to link back from"
github_linkback_access_token: 'A valid access token for the user who will post the linkback and for counting commits/contributions to grant badges. See <a href="https://meta.discourse.org/t/99895">here</a> for instructions on how to get a token.'
github_linkback_maximum_links: "Maximum number of linkbacks to create from one single post. When a post contains more links, none is created."
github_permalinks_enabled: "Enable GitHub permalink overwrites"
github_pr_status_enabled: "Show GitHub pull request status on oneboxes (draft, open, approved, merged, closed)"
github_webhook_secret: "Secret token for GitHub webhook signature verification. Configure this value in your GitHub webhook settings."
github_permalinks_exclude: "Filename or directory that should be excluded from permalink overwrites. Provide only filename or full path: user/repository/optional-directory/filename"
github_badges_enabled: "Enable GitHub badges"
github_badges_repos: "URLs of the GitHub repos to scan for contributions and commits"
github_silver_badge_min_commits: "Minimum number of commits for silver badge"
github_gold_badge_min_commits: "Minimum number of commits for gold badge"
errors:
invalid_badge_repo: "You must provide a GitHub URL or the repository name in the format github_user/repository_name"
invalid_github_linkback_access_token: "You must provide a valid GitHub linkback access token which has access to the badge repositories you have provided."
github_linkback:
commit_template: |
This commit has been mentioned on **%{title}**. There might be relevant details there:
%{post_url}
pr_template: |
This pull request has been mentioned on **%{title}**. There might be relevant details there:
%{post_url}
issue_template: |
This issue has been mentioned on **%{title}**. There might be relevant details there:
%{post_url}
github_commits_populator:
errors:
repository_identifier_invalid_pm_title: "Action required for discourse-github plugin"
repository_identifier_invalid_pm: |
A repository specified in the discourse-github plugin is invalid:
%{repo_name}
They should be specified as `user/repo`.
Badges will not be awarded until the name is corrected in
<a href="%{base_path}/admin/site_settings/category/plugins?filter=GitHub">discourse-github Site Settings</a>
and "github_badges_enabled" is turned back on.
repository_not_found_pm_title: "Action required for discourse-github plugin"
repository_not_found_pm: |
A repository specified in the discourse-github plugin returned a "Not Found"
error: %{repo_name}
Badges will not be awarded until the name is corrected in
<a href="%{base_path}/admin/site_settings/category/plugins?filter=GitHub">discourse-github Site Settings</a>
and "github_badges_enabled" is turned back on.
invalid_octokit_credentials_pm_title: "Action required for discourse-github plugin"
invalid_octokit_credentials_pm: |
The GitHub credentials provided to the discourse-github plugin are invalid. The "github badges enabled\ site
setting has been disabled, and commits will no longer be populated until the issue is resolved.
Check your "github linkback access token" site setting to ensure the token is correct and has permission to all
repos via
<a href="%{base_path}/admin/site_settings/category/plugins?filter=GitHub">discourse-github Site Settings</a>.