Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Jun 29, 2025

  • chore: add pr script, update publish script

  • update pr base

Summary by CodeRabbit

  • Chores
    • Added a new script to streamline creating GitHub pull requests targeting the dev branch.
    • Updated the publish-all script to ensure all published packages are set to public access.

* chore: add pr script, update publish script

* update pr base
Copilot AI review requested due to automatic review settings June 29, 2025 07:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR merges recent changes from dev into main and updates several npm scripts to support new workflows.

  • Adds a new "pr" npm script to create pull requests with a preset base branch.
  • Updates the "publish-all" script to include the "--access public" flag for package publishing.
Comments suppressed due to low confidence (1)

package.json:12

  • The new 'pr' script uses '--base dev', but the PR metadata indicates a merge from dev to main. Please verify if the base should be 'main' to reflect the intended merge target.
        "pr": "gh pr create --fill-first --base dev",

@coderabbitai
Copy link

coderabbitai bot commented Jun 29, 2025

Walkthrough

This change updates the package.json scripts by adding a new script for creating GitHub pull requests targeting the dev branch and modifies the existing publish-all script to ensure published packages have public access.

Changes

File Change Summary
package.json Added "pr" script for GitHub PR creation; updated "publish-all" script to set package access to public

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant CLI
    participant GitHub

    Developer->>CLI: Run "pnpm pr"
    CLI->>GitHub: Create PR (base: dev, autofill details)
    GitHub-->>Developer: PR created

    Developer->>CLI: Run "pnpm publish-all"
    CLI->>NPM Registry: Publish all packages with public access and 'next' tag
    NPM Registry-->>Developer: Packages published
Loading

Possibly related PRs

  • chore: add publish script #26: Originally introduced the "publish-all" script, which is now being modified to include public access and complemented with a new PR creation script.

Poem

A rabbit hops with scripts anew,
"pr" for PRs, quick and true!
"publish-all" now shouts out loud,
Public packages—standing proud.
With every hop and every run,
Our code and carrots—never done! 🥕


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.

❤️ 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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 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

@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

🧹 Nitpick comments (2)
package.json (2)

12-12: Hard-coded base branch in the new pr script reduces flexibility

gh pr create --fill-first --base dev assumes every PR should target dev.
Hot-fixes or release branches that must go straight to main (or any other branch) will require manually overriding the script or bypassing it.

-        "pr": "gh pr create --fill-first --base dev",
+        // BASE defaults to dev but can be overridden, works on all shells via cross-env
+        "pr": "cross-env BASE=${BASE:-dev} gh pr create --fill-first --base $BASE",

(Requires adding cross-env to dev-deps.)

At minimum, document the requirement that contributors need GitHub CLI installed and authenticated, otherwise the script will silently fail.


14-14: --access public can break publish if any workspace package is meant to stay private

Adding --access public forces every scoped package (e.g. @org/pkg) to be published publicly.
• NPM rejects private scopes with this flag.
• The CI job will fail half-way, leaving some packages unpublished and versions bumped.

Confirm that all packages under ./packages/** are intended for public NPM.
If not, consider reading each package’s own publishConfig.access or publishing per-package:

-        "publish-all": "pnpm --filter \"./packages/**\" -r publish --access public --tag next",
+        "publish-all": "pnpm --filter \"./packages/**\" -r exec -- pnpm publish --tag next",

(or split into publish-public / publish-private).

Also think about adding --no-git-checks --yes to prevent interactive prompts in CI.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7322db8 and 8f742d8.

📒 Files selected for processing (1)
  • package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build-test (20.x)
  • GitHub Check: Analyze (javascript-typescript)

@ymc9 ymc9 added this pull request to the merge queue Jun 29, 2025
Merged via the queue into main with commit c225e62 Jun 29, 2025
6 checks passed
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