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

feat: pre-release workflow #2910

Open
wants to merge 23 commits into
base: canary
Choose a base branch
from
Open

feat: pre-release workflow #2910

wants to merge 23 commits into from

Conversation

wingkwong
Copy link
Member

@wingkwong wingkwong commented Apr 29, 2024

Assumptions:

  • default branch is canary
  • main branch only stores as a snapshot (current production)
  • pre.json shouldn't be in main branch

📝 Description

Pre-release

Example (beta/release-next):

image

Example (canary): similar to above one

image

Enter Pre-releaes

  • Triggered manually in Github Action
  • only support canary or beta/release-next
  • pre.json will be created after the workflow
    image

Exit Pre-release

  • Triggered manually in Github Action
  • only support canary or beta/release-next
  • pre.json will be removed after the workflow
    image

Additional Info

image

  • requires read:user and repo:status permissions for exit prerelease

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced workflows to automate pre-release and release processes, enhancing the efficiency of version management and deployment.
    • Added a new script to facilitate entering beta pre-release mode directly from package configurations.
  • Documentation

    • Updated GitHub API endpoint URL in the release workflow for better integration and consistency.
    • Updated npm commands in documentation files for fetching the latest package versions under specific tags.

Copy link

linear bot commented Apr 29, 2024

Copy link

changeset-bot bot commented Apr 29, 2024

⚠️ No Changeset found

Latest commit: a3e219b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Apr 29, 2024

Walkthrough

The recent updates enhance pre-release processes on GitHub, particularly for beta releases. Workflows automate entering and exiting pre-release modes, managing PRs, and updating packages. Additionally, a GitHub API URL update improves branch synchronization.

Changes

File Path Summary
.github/workflows/.../enter-pre-release-mode.yaml
.github/workflows/.../exit-pre-release.yaml
.github/workflows/.../pre-release.yaml
Introduce workflows for entering, exiting pre-release, and handling PRs and NPM publishing for beta versions.
.github/workflows/.../release.yaml Updates GitHub API endpoint URL for branch sync event triggers.
package.json Adds scripts to enter beta and canary pre-release modes.

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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.

Copy link

vercel bot commented Apr 29, 2024

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

Name Status Preview Comments Updated (UTC)
nextui-docs-v2 ❌ Failed (Inspect) May 17, 2024 1:26pm
nextui-storybook-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 1:26pm

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: 2

.github/workflows/pre-release.yaml Show resolved Hide resolved
.github/workflows/pre-release.yaml Show resolved Hide resolved
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.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 7296151 and a5b28bb.
Files selected for processing (6)
  • .changeset/config.json (1 hunks)
  • .github/workflows/enter-pre-release-mode.yaml (1 hunks)
  • .github/workflows/exit-pre-release.yaml (1 hunks)
  • .github/workflows/pre-release.yaml (1 hunks)
  • .github/workflows/release.yaml (2 hunks)
  • package.json (1 hunks)
Files skipped from review due to trivial changes (1)
  • .changeset/config.json
Files skipped from review as they are similar to previous changes (5)
  • .github/workflows/enter-pre-release-mode.yaml
  • .github/workflows/exit-pre-release.yaml
  • .github/workflows/pre-release.yaml
  • .github/workflows/release.yaml
  • package.json

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

Out of diff range and nitpick comments (1)
apps/docs/components/sandpack/use-sandpack.ts (1)

[!TIP]
Codebase Verification

The verification process has identified an inconsistency in the versioning of the @nextui-org/react dependency within the use-sandpack.ts file. It is currently set to "latest" instead of the intended "canary" version. This appears to be an oversight that needs correction.

  • File and Location: apps/docs/components/sandpack/use-sandpack.ts
  • Suggested Correction: Update the version of @nextui-org/react from "latest" to "canary" to maintain consistency across the project.
Analysis chain

Line range hint 147-163: Update dependencies to use the "canary" version consistently.

Ensure that all dependencies are correctly updated across the entire project to reflect these changes.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that all dependencies across the project use the "canary" version where applicable.

# Test: Search for dependency declarations not using the "canary" version. Expect: No occurrences outside the specified ones.
rg --type ts $'@nextui-org/.*"latest"'

Length of output: 120



Script:

#!/bin/bash
# Description: Search for all occurrences of @nextui-org dependencies to check their versioning across the project.

# Test: List all @nextui-org dependencies and their versions.
rg --type ts '@nextui-org/.*"'

Length of output: 184525

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between a5b28bb and 08281f6.
Files selected for processing (2)
  • apps/docs/components/sandpack/use-sandpack.ts (2 hunks)
  • apps/docs/preinstall.js (1 hunks)
Additional comments not posted (1)
apps/docs/preinstall.js (1)

29-29: Ensure that the npm show command handles potential errors.

@@ -26,7 +26,7 @@ fs.readFile("./package.json", "utf8", function (err, data) {
// Check if the package is in the @nextui-org namespace and has "workspace:*" as its version
if (pkg.startsWith("@nextui-org/") && packageJson.dependencies[pkg] === "workspace:*") {
// Get the latest version of the package under the specified tag
const latestVersion = execSync(`npm show ${pkg}@dev-v2 version`, {encoding: "utf8"}).trim();
const latestVersion = execSync(`npm show ${pkg}@canary version`, {encoding: "utf8"}).trim();
Copy link
Member Author

@wingkwong wingkwong May 17, 2024

Choose a reason for hiding this comment

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

maybe some packages don't have canary version yet. hence the doc build is failing.

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.

None yet

2 participants