Skip to content

[3.0] Points the dead labeler rules at paths that exist - #9580

Merged
jdarwood007 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/labeler-dead-globs
Aug 29, 2026
Merged

[3.0] Points the dead labeler rules at paths that exist#9580
jdarwood007 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/labeler-dead-globs

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

Eleven globs in .github/labeler.yml named a path that is not in the repository, so the Pull Request Labeler job could never apply those labels. Two rules, Anti-spam and External data, had no working glob at all and could not fire under any circumstances.

Rule Glob as written Fixed to
Administrative Theme/default/Admin.template.php Themes/default/Admin.template.php
Anti-spam Sources/Actions/Admin/Anti-spam.php Sources/Actions/Admin/AntiSpam.php
Anti-spam Sources/AntiSpam/** removed, see below
Anti-spam Sources/ReCaptcha/** replaced by Themes/default/scripts/captcha.js
Boards Themes/defalt/Board** Themes/default/Board**
External data Sources/WebFetch** Sources/WebFetch/**
github_actions .github_actions/workflows/** .github/workflows/**
Membergroups Sources/Actions/Admin/Membegroups.php Sources/Actions/Admin/Membergroups.php
Moderation Sources/Moderation** Sources/Actions/Moderation/**
Registration Sources/Actins/Register** Sources/Actions/Register**
Smileys Sources/ActionAdmin/Smileys.php Sources/Actions/Admin/Smileys.php
Subscriptions Sources/Subscriptions** Sources/Subscriptions/**

Two of these are worth a word.

"Login Sessions" is not in the table because it is not a path problem: the rule key was "Login Sessions", while the label in the repository is named Login/Sessions. The job cannot apply a label under a name that does not exist, so that rule was dead too. It is renamed to match.

Sources/AntiSpam/ and Sources/ReCaptcha/ have never existed in this repository. The only anti-spam code is Sources/Actions/Admin/AntiSpam.php and Themes/default/scripts/captcha.js, so the rule now names those. If those directories are planned, say so and I will put the globs back instead.

Three of the fixes are the same trap rather than a typo: in minimatch, ** only crosses a / when it is a whole path segment. Sources/WebFetch** therefore behaves as Sources/WebFetch* and matches nothing, because WebFetch is a directory; Sources/WebFetch/** matches its seven files. The same applies to Sources/Subscriptions** and to Sources/Moderation**, whose files live under Sources/Actions/Moderation/.

How this was checked

Every glob was run against git ls-files with the same matcher the action uses (minimatch, dot: true). Before this change, 2 rules and 11 globs matched no tracked file. After it, every rule and every glob matches at least one.

Issues References (Fixes|Related|Closes)

  1. Fixes [3.0]: Seven labeler.yml rules name paths that do not exist, so those labels are never applied #9579

Eleven globs in labeler.yml named a path that is not in the repository, so
the job could never apply those labels. Two rules, Anti-spam and External
data, could not fire at all.

Also renames the "Login Sessions" rule to "Login/Sessions", which is what the
label is actually called; the job cannot apply a label under a name that does
not exist.

Sources/AntiSpam/ and Sources/ReCaptcha/ have never existed, so the Anti-spam
rule now names the admin action that does, plus the captcha script.

With this every rule and every glob matches at least one tracked file.

Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@jdarwood007 jdarwood007 added the Meta Repository tools label Aug 29, 2026
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Aug 29, 2026
@jdarwood007
jdarwood007 merged commit 25f9d43 into SimpleMachines:release-3.0 Aug 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Meta Repository tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[3.0]: Seven labeler.yml rules name paths that do not exist, so those labels are never applied

2 participants