mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-06 18:12:46 +08:00
Sometimes you have categories where posts mention GitHub URLs but you don't actually want linkback comments posted to GitHub — think AI-generated summaries or automated reports that reference commits but would just create noise on the issue tracker. This adds a `github_linkback_ignored_categories` site setting that lets admins specify which categories should be skipped entirely when processing linkbacks. Posts in those categories won't trigger any GitHub comments, keeping things clean. To make this work nicely, the setting uses the `category_list` type which gives you a proper category picker in the admin UI rather than having to type raw IDs. This required extending core's `_map` metaprogramming helper (which previously only worked with `group_list` settings) to also handle `category_list` — so now any `category_list` setting automatically gets a `_map` variant that returns an array of integers, just like group settings do. Screenshot of new setting: <img width="774" height="116" alt="discourse-github-ignore-cat" src="https://github.com/user-attachments/assets/dd9a3c85-7f01-47c6-b1b7-fe6ef120ab8b" /> Ref: /t/141863 --------- Co-authored-by: zogstrip <regis@hanol.fr>
40 lines
931 B
YAML
40 lines
931 B
YAML
discourse_github:
|
|
enable_discourse_github_plugin:
|
|
default: false
|
|
github_linkback_enabled:
|
|
default: false
|
|
github_linkback_projects:
|
|
default: ""
|
|
type: list
|
|
github_linkback_access_token:
|
|
default: ""
|
|
secret: true
|
|
validator: "GithubLinkbackAccessTokenSettingValidator"
|
|
github_linkback_maximum_links:
|
|
default: 25
|
|
min: 1
|
|
github_linkback_ignored_categories:
|
|
default: ""
|
|
type: category_list
|
|
github_badges_enabled:
|
|
default: false
|
|
github_badges_repos:
|
|
default: ""
|
|
type: list
|
|
validator: "GithubBadgesRepoSettingValidator"
|
|
github_permalinks_enabled:
|
|
default: false
|
|
github_pr_status_enabled:
|
|
default: false
|
|
github_webhook_secret:
|
|
default: ""
|
|
secret: true
|
|
github_permalinks_exclude:
|
|
default: "README.md"
|
|
type: list
|
|
github_silver_badge_min_commits:
|
|
default: 25
|
|
min: 1
|
|
github_gold_badge_min_commits:
|
|
default: 250
|
|
min: 1
|