chore: add codeowners - #352
Conversation
|
View your CI Pipeline Execution ↗ for commit d3eb6e6
☁️ Nx Cloud last updated this comment at |
📝 WalkthroughWalkthroughThe change adds CODEOWNERS rules for repository configuration and tooling paths. All listed paths are assigned to the TanStack core team. ChangesCODEOWNERS Configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@tanstack/angular-store
@tanstack/lit-store
@tanstack/octane-store
@tanstack/preact-store
@tanstack/react-store
@tanstack/solid-store
@tanstack/store
@tanstack/svelte-store
@tanstack/vue-store
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/CODEOWNERS:
- Around line 1-6: Anchor each repository-root CODEOWNERS pattern by adding a
leading slash to the entries for .github, .nx, nx.json, .changeset/config.json,
scripts, and .npmrc, so they match only those root-level paths.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| .github/ @TanStack/tanstack-core | ||
| .nx/ @TanStack/tanstack-core | ||
| nx.json @TanStack/tanstack-core | ||
| .changeset/config.json @TanStack/tanstack-core | ||
| scripts/ @TanStack/tanstack-core | ||
| .npmrc @TanStack/tanstack-core No newline at end of file |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
GitHub Codeowners unanchored directory pattern matches directories at all levels leading slash root only
💡 Result:
GitHub CODEOWNERS patterns follow most rules used in gitignore files, but their directory matching behavior depends on how they are anchored and whether wildcards are used [1][2][3]. A pattern is anchored to the root of the repository if it starts with a leading slash (/) [3]. Patterns without a leading slash are unanchored and match at any depth in the repository [3][4]. Regarding directory matching: 1. Unanchored directory patterns: A pattern like dir/ (without a leading slash) matches a directory named dir at any level in the repository hierarchy [3][4]. 2. The * wildcard limit: A pattern using a single asterisk, such as docs/*, matches files directly within the specified directory but does not recursively match files in nested subdirectories [1][5]. This is consistent with how gitignore handles single-level globbing [6]. 3. Recursive matching: To match all files and subdirectories within a directory at any depth, you must use the double asterisk syntax (e.g., docs/) [6][3][5]. In summary, an unanchored pattern does not restrict matching to the root; it matches anywhere in the repository [3]. However, simply naming a directory followed by /* will not provide the recursive matching behavior that users often expect for directory trees; for that, / is required [1][6][3][5].
Citations:
- 1: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
- 2: https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
- 3: https://letcodes.com/git/codeowners
- 4: https://github.com/ai-dynamo/dynamo/blob/74b79d04/.github/codeowners/codeowners_match.py
- 5: https://stackoverflow.com/questions/79782192/glob-in-codeowners-matching-less-than-a-hardcoded-name
- 6: https://stackoverflow.com/questions/66052546/codeowners-syntax-foobar-vs-foobar
Anchor repository-root paths.
If these rules target only root-level configuration and tooling, add / before each rooted path. Unanchored directory patterns match the same directory name anywhere in the repository.
Proposed fix
-.github/ `@TanStack/tanstack-core`
-.nx/ `@TanStack/tanstack-core`
-nx.json `@TanStack/tanstack-core`
-.changeset/config.json `@TanStack/tanstack-core`
-scripts/ `@TanStack/tanstack-core`
-.npmrc `@TanStack/tanstack-core`
+/.github/ `@TanStack/tanstack-core`
+/.nx/ `@TanStack/tanstack-core`
+/nx.json `@TanStack/tanstack-core`
+/.changeset/config.json `@TanStack/tanstack-core`
+/.npmrc `@TanStack/tanstack-core`
+/scripts/ `@TanStack/tanstack-core`
/.changeset/config.json `@TanStack/tanstack-core`
/.npmrc `@TanStack/tanstack-core`🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/CODEOWNERS around lines 1 - 6, Anchor each repository-root
CODEOWNERS pattern by adding a leading slash to the entries for .github, .nx,
nx.json, .changeset/config.json, scripts, and .npmrc, so they match only those
root-level paths.
As part of our ongoing security hardening, we're mandating specific sensitive release files to be approved by the core maintainers team.
Summary by CodeRabbit