Repository navigation
Conversation
Code Owners Breakdown
2 files changed across 1 team @MetaMask/mobile-platform (2 files)
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Neither file touches: app source code, controllers, navigation, UI components, E2E test infrastructure (tests/, page-objects, fixtures, .detoxrc.js), build configuration, or any user-facing functionality. These are purely developer tooling additions for PR workflow automation. No E2E tests are needed to validate these changes. Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| p = p.replace(/\*\*\//g, '((.+/)|)'); // **/ → any prefix or nothing | ||
| p = p.replace(/\/\*\*/g, '(/.*)?'); // /** → any suffix (optional) | ||
| p = p.replace(/\*\*/g, '.*'); // lone ** → anything | ||
| p = p.replace(/\*/g, '[^/]*'); // * → one segment |
There was a problem hiding this comment.
Glob-to-regex * replacement corrupts earlier regex output
High Severity
The final p.replace(/\*/g, '[^/]*') on line 27 matches literal * characters that were already emitted as regex metacharacters by the /** and ** replacements on lines 25–26. For example, /** becomes (/.*)?, but then the * inside .* is corrupted to [^/]*, producing (/.[^/]*)? — which only matches a single path segment instead of crossing / boundaries. This breaks all **/dir/** patterns in the CODEOWNERS file (20+ rules across ~10 teams), causing deeply nested files to be incorrectly classified as "Unowned."
Additional Locations (1)
| p = p.replace(/\*\*\//g, '((.+/)|)'); // **/ → any prefix or nothing | ||
| p = p.replace(/\/\*\*/g, '(/.*)?'); // /** → any suffix (optional) | ||
| p = p.replace(/\*\*/g, '.*'); // lone ** → anything | ||
| p = p.replace(/\*/g, '[^/]*'); // * → one segment |
There was a problem hiding this comment.
Glob ? detected but never converted to regex
Low Severity
The hasTrailingWildcard check on line 18 treats ? as a glob wildcard, and the comment on line 20 says it's left for glob conversion, but no conversion step ever translates glob ? (match any single character) into its regex equivalent (e.g., [^/]). It's also not in the escape list on line 21. An unescaped ? in a regex acts as a "0 or 1" quantifier on the preceding element, which is semantically wrong for glob ?. No current CODEOWNERS pattern uses ?, but any future pattern containing it will silently produce incorrect matching.
|
|
This PR has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions. |
|
This PR was closed because there has been no follow up activity in 7 days. Thank you for your contributions. |





Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Medium risk because it introduces new GitHub Actions automation with
pull-requests: writepermission and custom glob-to-regex parsing that could misattribute ownership or spam/overwrite comments if incorrect.Overview
Adds an automated PR comment that summarizes changed files by their
CODEOWNERSowners and highlights any unowned changes.Introduces
.github/scripts/codeowners-comment.mjsto parse.github/CODEOWNERS, map PR-changed filenames to the last matching rule (including ownerless overrides like**/*.snap), and generate a table plus expandable file lists.Adds
.github/workflows/codeowners-comment.ymlto run on PR open/sync (non-forks), fetch changed files viagh api, generate the markdown, and create/update a single marker-tagged comment.Written by Cursor Bugbot for commit 3f50bf4. This will update automatically on new commits. Configure here.