chore: standardize repository config - #734
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Preview is ready!
↩️ Previous: ⚡️ 🤖 Powered by surge-preview |
|||||||||||||||
|
Warning Review limit reached
Next review available in: 59 minutes Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable usage-based reviews in Billing to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information, and refer to the rate limits docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
Walkthrough该 PR 将 README 整体重写并新增中文版文档,更新了 Vercel 部署配置、dumi 路径变量、tsconfig include 字段及 package.json 脚本,新增了 Surge 预览与 React Doctor GitHub Actions 工作流,并对 CodeQL、CI 工作流权限和 Dependabot 计划进行了调整。 Changes仓库文档与自动化更新
估算代码审查工作量🎯 3 (Moderate) | ⏱️ ~20 minutes 可能相关的 PR
建议的审查者
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #734 +/- ##
=======================================
Coverage 95.78% 95.78%
=======================================
Files 6 6
Lines 332 332
Branches 92 92
=======================================
Hits 318 318
Misses 14 14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request cleans up the repository configuration and documentation, including updating the funding configuration, adding Vercel deployment settings, and modernizing the README. Feedback on these changes suggests adding an "exclude" field to "tsconfig.json" to prevent compilation issues, removing a redundant "now-build" script from "package.json", and replacing the internal "ValueType" reference in the README with "number | string" for better clarity.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (4)
README.md (3)
94-94: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value修正连字符使用。
"read-only" 作为复合形容词修饰 "input",需要添加连字符。
- | readOnly | `boolean` | `false` | Mark the input as read only. | + | readOnly | `boolean` | `false` | Mark the input as read-only. |🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 94, The README wording for the readOnly property uses “read only” without a hyphen; update the description to use the correct compound adjective “read-only” when describing the input, keeping the rest of the table entry unchanged.Source: Linters/SAST tools
29-29: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value修正连字符使用。
复合形容词 "string-based" 修饰名词 "value flows",需要添加连字符。
- - TypeScript generic value typing for number and string based value flows. + - TypeScript generic value typing for number and string-based value flows.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 29, The README wording uses “string based” without the needed hyphen for a compound modifier; update the affected text to use “string-based” consistently. Locate the sentence in the README that describes TypeScript generic value typing and adjust the phrasing so the compound adjective is hyphenated correctly.Source: Linters/SAST tools
96-96: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value修正连字符使用。
"high-precision" 作为复合形容词修饰 "decimals",需要添加连字符。
- | stringMode | `boolean` | `false` | Keep values as strings for high precision decimals. | + | stringMode | `boolean` | `false` | Keep values as strings for high-precision decimals. |🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 96, The README entry for stringMode uses “high precision decimals” without the needed hyphen; update the wording to “high-precision decimals” in the table description. Locate the stringMode description in README.md and keep the rest of the text unchanged.Source: Linters/SAST tools
.github/workflows/react-doctor.yml (1)
9-13: 🔒 Security & Privacy | 🔵 Trivial收紧
push事件下的非必要写权限。该工作流同时响应
pull_request和push。经核实,millionco/react-doctorAction 仅在pull_request事件下执行需要pull-requests: write和issues: write的操作(如发布评论);在push事件下,这些步骤会自动跳过,仅保留statuses: write用于发布提交状态。当前在顶层定义
pull-requests: write和issues: write会导致在push事件(如推送到主分支)时GITHUB_TOKEN拥有不必要的宽泛写权限,违反最小权限原则。建议移除工作流级别的这两项写权限,仅在需要 PR 操作的 Job 或 PR 触发条件下通过作业级权限覆盖来声明。建议修改
# 移除顶层多余的写权限 permissions: contents: read statuses: write jobs: react-doctor: runs-on: ubuntu-latest if: github.event_name == 'pull_request' || github.event_name == 'push' permissions: # PR 场景才需要的权限(仅在 PR 事件有效) pull-requests: write issues: write # 全局保持的最小权限已在 workflow 级定义,此处可省略或明确 steps: # ...或更简单地,若 Job 级权限未显式声明 PR 相关权限,
push事件下将仅使用工作流级的statuses: write,从而自然实现权限缩减。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/react-doctor.yml around lines 9 - 13, The workflow-level permissions are too broad for the mixed pull_request/push trigger. Update the react-doctor workflow so pull-requests: write and issues: write are not granted at the top level; keep only the minimal global permissions needed for push status reporting, and move any PR-only write permissions to the react-doctor job or PR-specific scope. This change should be applied in the workflow permissions block while preserving the existing pull_request and push behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/cloudflare-pages-preview.yml:
- Around line 17-41: The Cloudflare credentials are scoped too broadly in this
workflow, exposing them to untrusted build steps like npm install and npm run
build. Move CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID out of the job-level
env and into the Deploy preview step only, keeping the earlier
skip/install/build steps free of any Cloudflare secrets. Use the existing
cloudflare/wrangler-action step and the CLOUDFLARE_PAGES_PROJECT/env checks to
preserve the current behavior while limiting secret access.
In @.github/workflows/surge-preview.yml:
- Around line 19-36: The surge preview workflow is running untrusted PR build
commands while `SURGE_TOKEN` is available, which can expose the secret. Split
the logic in the workflow so `npm install` and `npm run build` happen in a
separate step or job that does not have `SURGE_TOKEN`, then run the
`afc163/surge-preview` deployment only after the `docs-dist` artifact is
produced and with the token injected just for that deploy step. If
`afc163/surge-preview` cannot disable its internal `build` behavior, replace it
with a separated deployment job or direct Surge CLI publish flow.
In `@README.md`:
- Line 122: The public API is missing the InputFocusOptions type even though
InputNumberRef.focus uses it, so users cannot reference the parameter type from
the package entrypoint. Update the package’s main type exports in src/index.ts
to explicitly re-export InputFocusOptions alongside InputNumberProps, ValueType,
and InputNumberRef, and ensure the README type signature stays aligned with the
exported API.
---
Nitpick comments:
In @.github/workflows/react-doctor.yml:
- Around line 9-13: The workflow-level permissions are too broad for the mixed
pull_request/push trigger. Update the react-doctor workflow so pull-requests:
write and issues: write are not granted at the top level; keep only the minimal
global permissions needed for push status reporting, and move any PR-only write
permissions to the react-doctor job or PR-specific scope. This change should be
applied in the workflow permissions block while preserving the existing
pull_request and push behavior.
In `@README.md`:
- Line 94: The README wording for the readOnly property uses “read only” without
a hyphen; update the description to use the correct compound adjective
“read-only” when describing the input, keeping the rest of the table entry
unchanged.
- Line 29: The README wording uses “string based” without the needed hyphen for
a compound modifier; update the affected text to use “string-based”
consistently. Locate the sentence in the README that describes TypeScript
generic value typing and adjust the phrasing so the compound adjective is
hyphenated correctly.
- Line 96: The README entry for stringMode uses “high precision decimals”
without the needed hyphen; update the wording to “high-precision decimals” in
the table description. Locate the stringMode description in README.md and keep
the rest of the text unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 94228eb2-3d27-4086-adf6-85bf363165f2
📒 Files selected for processing (11)
.github/FUNDING.yml.github/workflows/cloudflare-pages-preview.yml.github/workflows/codeql.yml.github/workflows/react-component-ci.yml.github/workflows/react-doctor.yml.github/workflows/surge-preview.yml.gitignoreREADME.mdpackage.jsontsconfig.jsonvercel.json
|
Deployment failed with the following error: Learn More: https://vercel.com/afc163s-projects?upgradeToPro=build-rate-limit |
|
Deployment failed with the following error: Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit |

Summary
Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.
Tracking issue: ant-design/ant-design#58514
Scope
types: "./es/index.d.ts", publishConfig, and release flow through@rc-component/np.react-component/rc-test/.github/workflows/test-utoo.yml@mainworkflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.docs-distoutput and remove legacynow-build/ Cloudflare Pages residue.Notes
secrets: inheritis kept untilreact-component/rc-test#176is merged, then it can be narrowed to explicitCODECOV_TOKENforwarding.