Skip to content

Conversation

@afc163
Copy link
Member

@afc163 afc163 commented Nov 25, 2025

Summary by CodeRabbit

Chores

  • 更新了文档构建配置,将输出目录从 'docs-dist' 更改为 '.doc'
  • 简化了 CI/CD 工作流,使用外部工作流进行测试管理
  • 更新了部署脚本以适配新的输出目录配置
  • 添加了 Vercel 部署框架配置以支持 UmiJS

✏️ Tip: You can customize this high-level summary in your review settings.

@gemini-code-assist
Copy link

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@vercel
Copy link

vercel bot commented Nov 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
overflow Error Error Dec 12, 2025 3:11am

@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

概览

此变更调整了项目的构建输出目录(从 docs-dist 改为 .doc)、简化了 GitHub Actions 工作流为委托执行的外部工作流,删除了旧的 Vercel 配置文件,并引入新的 Vercel 配置文件指定 umijs 框架。

变更

队列 / 文件 变更摘要
构建输出路径配置
\.dumirc\.ts, package\.json
将文档输出目录从 docs-dist 更新为 .doc,影响 Dumi 配置和 gh-pages 部署脚本
CI/CD 工作流改造
\.github/workflows/main\.yml
将完整的多任务工作流(包含 checkout、lint、compile、coverage)替换为单一测试任务,委托至外部工作流 react-component/rc-test/.github/workflows/test-utoo.yml@main
Vercel 部署配置
now\.json, vercel\.json
移除旧的 now.json(v2 配置),新增 vercel.json 指定框架为 umijs

预估代码审查工作量

🎯 2 (简单) | ⏱️ ~12 分钟

  • 注意 .dumirc.ts 中输出路径变更是否与所有构建流程一致
  • 验证 GitHub Actions 委托至外部工作流后,所有测试、lint、编译步骤均已在外部工作流中正确实现
  • 确认 Vercel 配置从 now.json 迁移至 vercel.json 时,umijs 框架配置是否正确识别项目结构和构建产物位置(现为 .doc

诗歌

🐰 构建路径换新装,从 docs-dist 到 .doc,
工作流外包去奔忙,Vercel 配置焕然一新,
兔子啃着代码菜,部署流程更清爽!✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题"Refactor CI workflow and add test job"虽然提到了CI工作流重构,但忽略了同样重要的配置变更,如outputPath、docs:deploy脚本更新和Vercel配置更改。标题仅覆盖了部分主要变化,不够全面。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch afc163-patch-1

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.33%. Comparing base (64ea78f) to head (2fac16d).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
+ Coverage   97.20%   97.33%   +0.12%     
==========================================
  Files           7        7              
  Lines         215      225      +10     
  Branches       78       85       +7     
==========================================
+ Hits          209      219      +10     
  Misses          6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@socket-security
Copy link

socket-security bot commented Nov 25, 2025

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

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)
.dumirc.ts (1)

11-11: 考虑使用非隐藏目录作为构建输出

输出路径已更改为 .doc(隐藏目录)。虽然这在技术上是有效的,但使用以点开头的目录名称可能会导致:

  • 在某些文件浏览器中默认隐藏
  • 对新贡献者来说不太明显

如果希望保持构建产物的可见性,可以考虑使用 docdocs 等非隐藏目录名称。

.github/workflows/main.yml (1)

1-6: 外部工作流引用已验证,但建议考虑版本固定以增强稳定性

外部工作流 react-component/rc-test/.github/workflows/test-utoo.yml 已确认存在且可访问。但当前使用 @main 分支引用意味着外部工作流的任何变更都会立即影响此仓库。建议考虑将其固定到特定的发行标签或提交 SHA(例如 @v1.0.0@abc1234),以确保构建的稳定性和可预测性。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6efcec0 and 2fac16d.

📒 Files selected for processing (5)
  • .dumirc.ts (1 hunks)
  • .github/workflows/main.yml (1 hunks)
  • now.json (0 hunks)
  • package.json (1 hunks)
  • vercel.json (1 hunks)
💤 Files with no reviewable changes (1)
  • now.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test / react component workflow
🔇 Additional comments (3)
package.json (1)

34-34: 文档部署目录更新正确

部署脚本已正确更新为使用 .doc 目录,与 .dumirc.ts 中的 outputPath 配置保持一致。

.github/workflows/main.yml (1)

6-6: 注意 secrets 继承的安全影响

secrets: inherit 会将所有仓库密钥传递给外部工作流。虽然外部工作流来自同一组织 (react-component),这通常是安全的,但请确保:

  • 外部工作流的维护者是可信的
  • 了解哪些密钥会被传递
  • 外部工作流不会意外泄露或滥用这些密钥
vercel.json (1)

1-3: 框架标识符有效 — "umijs" 是 Vercel 支持的有效框架预设标识符,配置正确。

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