feat: add grep link functionality to rules and implement codemod grep link generator - #1056
feat: add grep link functionality to rules and implement codemod grep link generator#1056mohebifar wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughCatalog pages now generate public repository search links from catalog YAML or Playground state. VitePress inserts links into catalog Markdown, and catalog rule items render them when available. ChangesCatalog grep links
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR adds optional repository-search links to catalog entries without changing existing catalog behavior or introducing a material security or availability risk; it is merge-ready after normal checks and review, with no actionable merge-blocking risk remaining. Sequence Diagram(s)sequenceDiagram
participant Visitor
participant VitePress
participant GrepLinkBuilder
participant RuleItem
Visitor->>VitePress: open catalog page
VitePress->>GrepLinkBuilder: process catalog source and path
GrepLinkBuilder-->>VitePress: add public repository search link
VitePress->>RuleItem: provide RuleMeta.grepLink
RuleItem-->>Visitor: display repository search action
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 4 files. (1 skipped: 1 unsupported.)
✨ 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 |
| <a :href="meta.playgroundLink" class="playground link" target="_blank"> | ||
| Try in Playground → | ||
| </a> | ||
| <div class="rule-links"> |
There was a problem hiding this comment.
No, i don't like having too many links in the catalog page
| markdown: { | ||
| config(md) { | ||
| md.core.ruler.before('normalize', 'catalog-codemod-grep-link', (state) => { | ||
| state.src = addCodemodGrepLinkToCatalogPage(state.src, String(state.env.path || '')) |
There was a problem hiding this comment.
I think this should be added in source code markdown, or have a component to render it, instead of hiding behind a global transformation in config.ts
Summary by CodeRabbit