Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

chore: add Apache License 2.0 to multiple files#167

Merged
aravindputrevu merged 1 commit intomainfromalv2-changes
Dec 10, 2024

Conversation

@aravindputrevu
Copy link
Member

  • Added Apache License 2.0 header to various source files, including configuration, components, and stylesheets.
  • Ensured compliance with licensing requirements for CodeRabbit AI Inc.

This update standardizes licensing across the project files.

- Added Apache License 2.0 header to various source files, including configuration, components, and stylesheets.- Ensured compliance with licensing requirements for CodeRabbit AI Inc.This update standardizes licensing across the project files.
@aravindputrevuaravindputrevu requested a review froma team as acode ownerDecember 7, 2024 14:56
@coderabbitai
Copy link
Contributor

coderabbitaibot commentedDec 7, 2024
edited
Loading

Walkthrough

This pull request introduces the full text of the Apache License, Version 2.0, into theLICENSE file and adds copyright notices to various files, indicating compliance with the same license. Additionally, it includes enhancements to the blog plugin functionality, the creation of a YAML editor component, and updates to the footer and blog post item components. The overall structure and logic of existing components are preserved while extending their capabilities.

Changes

File PathChange Summary
LICENSEAdded full text of the Apache License, Version 2.0.
docusaurus.config.tsAdded copyright notice; no changes to existing configuration.
plugins/blog-plugin.jsIntroducedblogPluginExtended function to enhance blog plugin functionality with new routing.
sidebars.tsAdded copyright notice; no changes to sidebar configuration.
src/components/AiDisclaimer/AiDisclaimer.tsxAdded copyright notice; no changes to component logic.
src/components/AiDisclaimer/index.tsAdded copyright notice; no changes to exports.
src/components/AiDisclaimer/style.cssAdded copyright notice; no changes to CSS styles.
src/components/FeaturedPosts/FeaturedPosts.module.cssAdded copyright notice; no changes to CSS rules.
src/components/FeaturedPosts/FeaturedPosts.tsxAdded copyright notice; no changes to rendering logic.
src/components/ReportSchema.tsxAdded copyright notice; no changes to component logic.
src/components/SchemaViewer.tsxAdded copyright notice; no changes to component logic.
src/components/YamlEditor/YamlEditor.tsxNew component for editing YAML content with validation.
src/css/custom.cssAdded copyright notice; no changes to CSS structure.
src/pages/index.module.cssAdded copyright notice; no changes to CSS rules.
src/theme/BlogPostItem/index.jsNew componentBlogPostItemWrapper added to enhance blog post rendering.
src/theme/Footer/index.jsNew custom footer component added, extending original footer functionality.
tailwind.config.jsAdded copyright notice; no changes to existing configuration.

Possibly related PRs

Suggested reviewers

  • tyaga001
  • GurinderRawala

Poem

🐇 In the meadow where we play,
CodeRabbit hops with joy today!
Licenses added, plugins too,
A YAML editor, just for you!
With every line and every style,
We celebrate our code with a smile! 🌼


🪧 Tips

Chat

There are 3 ways to chat withCodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag@coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag@coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add@coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add@coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add@coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a.coderabbit.yaml file to the root of your repository.
  • Please see theconfiguration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit ourDocumentation for detailed information on how to use CodeRabbit.
  • Join ourDiscord Community to get help, request features, and share feedback.
  • Follow us onX/Twitter for updates and announcements.

@cloudflare-workers-and-pages

Deploying coderabbit-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit:c207ca9
Status: ✅  Deploy successful!
Preview URL:https://4565080f.coderabbit-docs.pages.dev
Branch Preview URL:https://alv2-changes.coderabbit-docs.pages.dev

View logs

Copy link
Contributor

@coderabbitaicoderabbitaibot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (3)
src/theme/BlogPostItem/index.js (1)

Line range hint16-39:Consider Adding PropTypes for Component Props

AddingPropTypes can enhance type checking and improve maintainability by explicitly defining the expected props for theBlogPostItemWrapper component.

You can importPropTypes and define the prop types as follows:

 import { useBlogPost } from "@docusaurus/theme-common/internal" import { AiDisclaimer } from "@site/src/components/AiDisclaimer"+import PropTypes from "prop-types" import BlogPostItem from "@theme-original/BlogPostItem" import { DiscussionEmbed } from "disqus-react" export default function BlogPostItemWrapper(props) {   // existing code... }+BlogPostItemWrapper.propTypes = {+  props: PropTypes.object,+}
src/components/YamlEditor/YamlEditor.tsx (1)

Line range hint34-59:Enhance Error Handling invalidateAndSetAnnotations

The current error handling may result in issues iferr.instancePath is undefined, especially for parsing errors fromjsYaml.load. To ensure robustness, adjust the error handling to account for all error types.

Apply this diff to improve error handling:

 function validateAndSetAnnotations(yaml) {   try {     const doc = jsYaml.load(yaml, { strict: true })     const isValid = validate(doc)     if (!isValid && validate.errors) {       setAnnotations(         validate.errors.map(err => {           const instancePathArr = err?.instancePath?.split("/")           const key =             instancePathArr && instancePathArr[instancePathArr.length - 1]           return {             row: err.instancePath ? getLineNumber(yaml, err.instancePath) : 0,             column: 0,             text: `${key}: ${err.message} ${               err?.params?.allowedValues                 ? `Allowed values: ${err.params.allowedValues.join(", ")}`                 : ""             }`,             type: "error",           }         }),       )     } else {       setAnnotations([])     }   } catch (err) {-    const instancePathArr = err?.instancePath?.split("/")-    const key = instancePathArr && instancePathArr[instancePathArr.length - 1]+    const key = err?.name || 'Error'     setAnnotations([       {-        row: err.instancePath ? getLineNumber(yaml, err.instancePath) : 0,+        row: err.mark ? err.mark.line : 0,         column: 0,         text:-          `${key}: ${err.message} ${-            err?.params?.allowedValues-              ? `Allowed values: ${err.params.allowedValues.join(", ")}`-              : ""-          }` || "YAML parsing error",+          `${key}: ${err.message}` || "YAML parsing error",         type: "error",       },     ])   } }
src/theme/Footer/index.js (1)

Line range hint35-38:Addalt Attributes to Images for Accessibility

Includingalt attributes in your<img> tags enhances accessibility for users relying on screen readers.

Apply this diff to includealt attributes:

 // Logo image <img   loading="lazy"   src={CRLogoBase64}+  alt="CodeRabbit Logo"   style={{     maxWidth: "200px",     height: "auto",   }} /> // Social media icons // Twitter <img   loading="lazy"   src="https://cdn.builder.io/api/v1/image/assets/TEMP/0f1b48f4977dc728d0cea441017f89664834046c1ce8f3916564bb9a1538f58a?"+  alt="Twitter"   className="aspect-square object-contain object-center w-5 overflow-hidden shrink-0 max-w-full" /> // LinkedIn <img   loading="lazy"   src="https://cdn.builder.io/api/v1/image/assets/TEMP/9ef98483828bc1c5e3349eb7c8da5c661ce0e7958e4dfe0e9c67db18e2019c65?"+  alt="LinkedIn"   className="aspect-square object-contain object-center w-5 overflow-hidden shrink-0 max-w-full" /> // Discord <img   loading="lazy"   src="https://cdn.builder.io/api/v1/image/assets/TEMP/54cf490c6e905acb0ac1e2d5b9946ca1adae440948393edc7a12ec1a68b7b95c?"+  alt="Discord"   className="aspect-square object-contain object-center w-5 overflow-hidden shrink-0 max-w-full" />

Also applies to: 50-53, 95-120

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between106208c andc207ca9.

📒 Files selected for processing (17)
  • LICENSE (1 hunks)
  • docusaurus.config.ts (1 hunks)
  • plugins/blog-plugin.js (1 hunks)
  • sidebars.ts (1 hunks)
  • src/components/AiDisclaimer/AiDisclaimer.tsx (1 hunks)
  • src/components/AiDisclaimer/index.ts (1 hunks)
  • src/components/AiDisclaimer/style.css (1 hunks)
  • src/components/FeaturedPosts/FeaturedPosts.module.css (1 hunks)
  • src/components/FeaturedPosts/FeaturedPosts.tsx (1 hunks)
  • src/components/ReportSchema.tsx (1 hunks)
  • src/components/SchemaViewer.tsx (1 hunks)
  • src/components/YamlEditor/YamlEditor.tsx (1 hunks)
  • src/css/custom.css (1 hunks)
  • src/pages/index.module.css (1 hunks)
  • src/theme/BlogPostItem/index.js (1 hunks)
  • src/theme/Footer/index.js (1 hunks)
  • tailwind.config.js (1 hunks)
✅ Files skipped from review due to trivial changes (13)
  • src/components/ReportSchema.tsx
  • src/pages/index.module.css
  • sidebars.ts
  • src/components/AiDisclaimer/style.css
  • tailwind.config.js
  • src/components/FeaturedPosts/FeaturedPosts.module.css
  • src/components/AiDisclaimer/index.ts
  • src/components/SchemaViewer.tsx
  • docusaurus.config.ts
  • src/components/AiDisclaimer/AiDisclaimer.tsx
  • LICENSE
  • src/css/custom.css
  • src/components/FeaturedPosts/FeaturedPosts.tsx
🔇 Additional comments (2)
plugins/blog-plugin.js (2)

1-15:License Header Added Successfully

The Apache License 2.0 header has been correctly added to the file.


Line range hint16-64:Extended Blog Plugin Implementation Approved

The code effectively extends the default blog plugin by overriding thecontentLoaded function while preserving existing functionality. The new route/featured-posts is properly added.

@aravindputrevuaravindputrevu merged commitc8c87d1 intomainDec 10, 2024
4 checks passed
@aravindputrevuaravindputrevu deleted the alv2-changes branchDecember 10, 2024 10:11
@NatoBoramNatoBoram mentioned this pull requestDec 10, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

2 more reviewers

@coderabbitaicoderabbitai[bot]coderabbitai[bot] approved these changes

@nehal-a2znehal-a2znehal-a2z approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@aravindputrevu@nehal-a2z

[8]ページ先頭

©2009-2025 Movatter.jp