Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Adding CI/CD Workflows and Scripts #40

Merged
merged 5 commits into from
Jul 14, 2024

Conversation

DhairyaMajmudar
Copy link
Contributor

@DhairyaMajmudar DhairyaMajmudar commented Jul 13, 2024

Adding CI/CD workflows

Workflows Added:

  1. issue-labeler.yml to label new issues with triage label
  2. stale-issue.yml to label issues and PRs stale for 180 days
  3. PR.workflow for checking format, lining and type of the code pushed

Scripts Added:

  1. typecheck : To check types
  2. format:fix: To fix the format errors
  3. format:check: To check the format errors

Related To #24

Summary by CodeRabbit

  • New Features

    • Introduced automated issue labeling with a “Triage” label for new issues.
    • Added workflow for marking stale issues and pull requests, with automated closure after inactivity.
  • Chores

    • Implemented a GitHub Actions workflow for pull requests, including linting, type checking, and building processes.
  • Style

    • Updated all imports and string literals to use double quotes for consistency.
    • Reformatted HTML, JSX, and CSS attributes for improved readability.
  • Refactor

    • Revised package.json scripts for linting and formatting.
    • Updated Tailwind CSS configuration with consistent double-quote usage and improved theme declarations.

Copy link

vercel bot commented Jul 13, 2024

@DhairyaMajmudar is attempting to deploy a commit to the francescoxx's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Jul 13, 2024

Walkthrough

The changes encompass the addition of GitHub Actions workflows for issue labeling, pull request handling, and stale issue management. Also included are updates to the package.json scripts for linting and formatting, and consistent use of double quotes and formatted attributes across various TypeScript and CSS files for better code consistency and readability.

Changes

File(s) Change Summary
.github/workflows/issue-labeler.yml Introduced an issue labeler workflow to automatically label new issues with "Triage".
.github/workflows/pull-request.yml Added a workflow for pull requests with jobs for linting, type checking, and building using Yarn.
.github/workflows/stale.yml Introduced a workflow to mark stale issues and pull requests based on inactivity.
package.json Replaced existing lint script with ts, typecheck, format:fix, and format:check scripts.
src/app/globals.css Adjusted formatting of CSS properties for transition and font-family.
src/app/page.tsx, .../Footer.tsx, .../GitHubStars.tsx, .../Header.tsx, .../SubstackEmbed.tsx Updated import statements and string literals from single quotes to double quotes; improved formatting.
tailwind.config.ts Updated string literals from single quotes to double quotes; changed font family values to strings.

Poem

In lines of code, we made our mark,
From single quotes to double spark.
With actions set to label and build,
Our workflow's now both smooth and skilled.
A rabbit hops amidst the change,
Ensuring all is well and sane.
Together we code, in harmony,
Embracing each new strategy. 🌟🐇


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration 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 our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@DhairyaMajmudar
Copy link
Contributor Author

Hi @FrancescoXX pls. once have a look into these : )

Copy link
Contributor

@coderabbitai coderabbitai bot 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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0f21c86 and d5d1254.

Files selected for processing (11)
  • .github/workflows/issue-labeler.yml (1 hunks)
  • .github/workflows/pull-request.yml (1 hunks)
  • .github/workflows/stale.yml (1 hunks)
  • package.json (1 hunks)
  • src/app/globals.css (1 hunks)
  • src/app/page.tsx (2 hunks)
  • src/components/Footer.tsx (1 hunks)
  • src/components/GitHubStars.tsx (3 hunks)
  • src/components/Header.tsx (1 hunks)
  • src/components/SubstackEmbed.tsx (1 hunks)
  • tailwind.config.ts (1 hunks)
Files skipped from review due to trivial changes (8)
  • .github/workflows/issue-labeler.yml
  • .github/workflows/stale.yml
  • src/app/globals.css
  • src/components/Footer.tsx
  • src/components/GitHubStars.tsx
  • src/components/Header.tsx
  • src/components/SubstackEmbed.tsx
  • tailwind.config.ts
Additional comments not posted (29)
package.json (5)

9-9: LGTM!

The lint script is correctly configured to run the linting process using Next.js.


10-10: LGTM!

The ts script is correctly configured to run TypeScript compilation without emitting output files.


11-11: LGTM!

The typecheck script is correctly configured to run TypeScript compilation with pretty output without emitting output files.


12-12: LGTM!

The format:fix script is correctly configured to run Prettier to fix formatting issues in TypeScript, JSON, and CSS files.


13-13: LGTM!

The format:check script is correctly configured to run Prettier to check for formatting issues in TypeScript and CSS files.

src/app/page.tsx (10)

1-1: LGTM!

The import statement for Header uses double quotes, which is consistent with the project's coding standards.


2-2: LGTM!

The import statement for Footer uses double quotes, which is consistent with the project's coding standards.


3-3: LGTM!

The import statement for Image uses double quotes, which is consistent with the project's coding standards.


4-4: LGTM!

The import statement for GitHubStars uses double quotes, which is consistent with the project's coding standards.


5-5: LGTM!

The import statement for SubstackEmbed uses double quotes, which is consistent with the project's coding standards.


14-18: LGTM!

The anchor tag attributes use double quotes, which is consistent with the project's coding standards.


21-26: LGTM!

The Image component attributes use double quotes, which is consistent with the project's coding standards.


32-34: LGTM!

The paragraph tag attributes use double quotes, which is consistent with the project's coding standards.


32-34: LGTM!

The paragraph tag attributes use double quotes, which is consistent with the project's coding standards.


32-34: LGTM!

The SubstackEmbed component is embedded with a comment, which is consistent with the project's coding standards.

.github/workflows/pull-request.yml (14)

11-12: LGTM!

The step is correctly configured to check out the repository using actions/checkout@v4.


14-16: LGTM!

The step is correctly configured to set the yarn cache directory path.


18-26: LGTM!

The step is correctly configured to cache Node dependencies using actions/cache@v4.


27-30: LGTM!

The step is correctly configured to list the state of node modules if the cache is not hit.


32-35: LGTM!

The step is correctly configured to set up Node.js using actions/setup-node@v4.


37-38: LGTM!

The step is correctly configured to install dependencies using yarn install --frozen-lockfile.


40-41: LGTM!

The step is correctly configured to run linting and formatting checks using yarn run lint.


43-44: LGTM!

The step is correctly configured to run type checking using yarn run typecheck.


51-54: LGTM!

The step is correctly configured to check out the repository with submodules using actions/checkout@v4.


56-58: LGTM!

The step is correctly configured to set the yarn cache directory path.


60-68: LGTM!

The step is correctly configured to cache Node dependencies using actions/cache@v4.


69-72: LGTM!

The step is correctly configured to list the state of node modules if the cache is not hit.


74-83: LGTM!

The step is correctly configured to cache the Next.js build using actions/cache@v4.


84-87: LGTM!

The step is correctly configured to set up Node.js using actions/setup-node@v4.

Copy link

vercel bot commented Jul 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rustcrab ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2024 5:55am

@FrancescoXX
Copy link
Owner

This branch has conflicts, can you check them? thank you

Copy link
Contributor

@coderabbitai coderabbitai bot 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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d5d1254 and bccc177.

Files selected for processing (5)
  • package.json (1 hunks)
  • src/app/page.tsx (1 hunks)
  • src/components/Footer.tsx (2 hunks)
  • src/components/GitHubStars.tsx (2 hunks)
  • src/components/SubstackEmbed.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (4)
  • package.json
  • src/components/Footer.tsx
  • src/components/GitHubStars.tsx
  • src/components/SubstackEmbed.tsx
Additional comments not posted (1)
src/app/page.tsx (1)

8-8: LGTM!

The addition of an empty line improves readability by separating the imports from the component definition.

@DhairyaMajmudar
Copy link
Contributor Author

This branch has conflicts, can you check them? thank you

I have removed the conflicts : )

@FrancescoXX
Copy link
Owner

thank you. btw we should proceed with issues first. I don't want the whole workflow to start failing and it's hard to test out without merging it

@DhairyaMajmudar
Copy link
Contributor Author

thank you. btw we should proceed with issues first. I don't want the whole workflow to start failing and it's hard to test out without merging it

Your concern is right, that's why I've tested the workflow in my local fork and they are working as expected.

image

image

Copy link
Contributor

@coderabbitai coderabbitai bot 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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bccc177 and 25b3c39.

Files selected for processing (3)
  • package.json (1 hunks)
  • src/app/page.tsx (1 hunks)
  • src/components/Header.tsx (3 hunks)
Files skipped from review as they are similar to previous changes (2)
  • src/app/page.tsx
  • src/components/Header.tsx
Additional comments not posted (5)
package.json (5)

9-9: LGTM! Script lint is correctly defined.

The lint script uses next lint which is appropriate for a Next.js project.


10-10: LGTM! Script ts is correctly defined.

The ts script uses tsc --noEmit to check for type errors without emitting output files.


11-11: LGTM! Script typecheck is correctly defined.

The typecheck script uses tsc --pretty --noEmit to check for type errors with pretty output formatting.


12-12: LGTM! Script format:fix is correctly defined.

The format:fix script uses prettier --write to fix formatting errors in the specified file types.


13-13: LGTM! Script format:check is correctly defined.

The format:check script uses prettier --check to check for formatting errors in the specified file types.

@FrancescoXX
Copy link
Owner

closes #40

@FrancescoXX FrancescoXX merged commit d6fe917 into FrancescoXX:main Jul 14, 2024
4 checks passed
@DhairyaMajmudar DhairyaMajmudar deleted the chore/workflows branch July 15, 2024 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants