Skip to content

Conversation

@zzcr
Copy link
Member

@zzcr zzcr commented Feb 7, 2025

添加hooks包自动化脚本

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • New Features
    • Enhanced automated processes now include hooks support. Hooks are built and published alongside existing components, streamlining releases and expanding our component ecosystem.

@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2025

Walkthrough

This pull request enhances the project's CI/CD workflows and build scripts to integrate hook support. New steps have been added to run build hooks before runtime builds, and the publish commands have been updated to include hook publishing. Additionally, the release process now processes the vue-hooks directory, and corresponding scripts have been added to package.json.

Changes

Files Change Summary
.github/workflows/auto-all-publish.yml,
.github/workflows/dispatch-all-publish-alpha.yml,
.github/workflows/dispatch-renderless-theme-publish-alpha.yml
Added new "Run Build Hooks" steps executing pnpm build:hooks before runtime builds; updated publish commands to include pnpm pub:hooks; updated input parameters and valid module names to support "hooks" in the dispatch-renderless-theme workflow.
internals/cli/.../releaseAlpha.ts Added 'vue-hooks' to the distLists array to include the hooks directory in processing.
package.json Introduced new scripts: "build:hooks": "pnpm -C packages/vue-hooks build" and "pub:hooks": "pnpm --filter=\"./packages/vue-hooks/\" publish --no-git-checks --access=public".

Sequence Diagram(s)

sequenceDiagram
    participant U as User/Commit
    participant CI as GitHub Workflow
    U->>CI: Trigger workflow
    CI->>CI: Execute "Run Build Hooks" (pnpm build:hooks)
    CI->>CI: Execute Build Runtime steps
    CI->>CI: Run Publish Command (pnpm pub:all, pnpm pub:utils, pnpm pub:hooks, etc.)
    CI->>U: Report status
Loading

Possibly related PRs

Suggested labels

ci, enhancement

Suggested reviewers

  • kagol

Poem

I'm a rabbit dancing through the code,
Hopping along new steps in the workflow road,
Building hooks with a joyful leap,
Publishing dreams for all to keep,
In our digital burrow, everything's anew—
CodeRabbit smiles, and so do you!
🐇💻


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f4fcf7a and 3270c3e.

📒 Files selected for processing (5)
  • .github/workflows/auto-all-publish.yml (1 hunks)
  • .github/workflows/dispatch-all-publish-alpha.yml (1 hunks)
  • .github/workflows/dispatch-renderless-theme-publish-alpha.yml (4 hunks)
  • internals/cli/src/commands/release/releaseAlpha.ts (1 hunks)
  • package.json (2 hunks)
🔇 Additional comments (10)
internals/cli/src/commands/release/releaseAlpha.ts (1)

75-76: LGTM! Hooks directory correctly added to release process.

The addition of 'vue-hooks' to the distLists array ensures that the hooks package is properly processed during the release process.

.github/workflows/auto-all-publish.yml (2)

73-75: LGTM! Build hooks step properly integrated.

The build step is correctly positioned before the runtime build, maintaining proper build order.


80-80: LGTM! Publish command updated to include hooks.

The publish command maintains consistency with other packages and uses the correct environment token.

.github/workflows/dispatch-all-publish-alpha.yml (2)

85-87: LGTM! Build hooks step properly integrated.

The build step is correctly positioned before the runtime build, maintaining proper build order.


95-95: LGTM! Publish command updated to include hooks.

The publish command maintains consistency with other packages and includes all necessary components.

.github/workflows/dispatch-renderless-theme-publish-alpha.yml (3)

10-10: LGTM! Documentation updated to include hooks.

The components description is clear and properly includes hooks as a valid module.


28-28: LGTM! Hooks added to valid module names.

The validation logic properly includes hooks as a valid module name.


88-91: LGTM! Build and publish steps properly configured.

The conditional build and publish steps for hooks:

  • Follow the same pattern as other components
  • Use correct conditions and environment variables
  • Maintain consistency in implementation

Also applies to: 108-114

package.json (2)

69-69: New Hook Build Command Added
The addition of the "build:hooks" script using "pnpm -C packages/vue-hooks build" is in line with the project’s pattern for building packages. Please ensure that the "packages/vue-hooks" directory exists and that its build process is correctly set up.


86-86: New Hooks Publish Command Added
The new "pub:hooks" script follows the existing publish command conventions by using the "--filter" option to target the hooks package, and it includes necessary flags ("--no-git-checks" and "--access=public"). Verify that the filter path ("./packages/vue-hooks/") accurately reflects your repository structure and that the publishing settings align with your public access requirements.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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>, 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

@petercat-assistant
Copy link

Walkthrough

此PR添加了一个自动化脚本,用于管理和发布hooks包。主要涉及到CI工作流文件的更新和package.json中的构建与发布脚本的调整。

Changes

文件 概要
.github/workflows/auto-all-publish.yml, .github/workflows/dispatch-all-publish-alpha.yml 更新了工作流以支持hooks包的自动化发布。
.github/workflows/dispatch-renderless-theme-publish-alpha.yml 增加了对hooks包的支持,调整了相关发布流程。
internals/cli/src/commands/release/releaseAlpha.ts 在发布列表中增加了'vue-hooks',以便在发布时包含此包。
package.json 添加了hooks包的构建和发布脚本。

@github-actions
Copy link

github-actions bot commented Feb 7, 2025

[e2e-test-warn]
The component to be tested is missing.

The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug".

Please make sure you've read our contributing guide

@zzcr zzcr merged commit 4e4784a into dev Feb 8, 2025
11 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Feb 12, 2025
13 tasks
@kagol kagol deleted the add-hooks-git-action-0207 branch April 14, 2025 12:19
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