Skip to content

chore: standardize repository config#180

Open
afc163 wants to merge 11 commits into
masterfrom
codex/standardize-rc-config
Open

chore: standardize repository config#180
afc163 wants to merge 11 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Redesign README with scoped package name, install command, usage, API, development, release, badges, and Ant Design ecosystem note.
  • Switch the main CI to react-component/rc-test/.github/workflows/test-utoo.yml@main.
  • Add React Doctor, Vercel config, Surge preview fallback, optional Cloudflare Pages preview, Funding config, and pinned action SHAs.
  • Align docs output to docs-dist and ignore local preview artifacts.

Test

  • npm install
  • npm run prettier
  • npm run lint
  • npm run tsc
  • npm test -- --runInBand
  • npm run compile
  • npm run build
  • npx vercel build --yes

Refs ant-design/ant-design#58514

Summary by CodeRabbit

  • 新功能
    • 新增 PR 预览、代码质量检查和持续集成相关配置,提升提交后的自动化反馈。
    • 增加站点部署与资金支持配置,便于发布与项目支持。
  • 改进
    • 更新构建输出目录为 docs-dist,并同步调整部署相关设置。
    • 重写 README,优化结构、示例和 API 说明,补充引用与开发指引。
  • Bug 修复
    • 统一和精简工作流配置写法,保持触发行为一致并提升稳定性。

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
input Ready Ready Preview, Comment Jun 26, 2026 6:01pm

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@afc163, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 4 minutes and 3 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 credits.

🚦 How do rate 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dbd66a07-5926-4091-9329-6e7841a55000

📥 Commits

Reviewing files that changed from the base of the PR and between 3663b04 and ed2b82c.

📒 Files selected for processing (2)
  • .github/workflows/surge-preview.yml
  • README.md

Walkthrough

更新了文档构建输出和预览/部署配置,调整了包脚本与格式化工具,重写 README 并补充资助项,同时替换和新增多个 GitHub Actions 工作流。

Changes

文档站点与仓库说明

Layer / File(s) Summary
输出目录与预览发布
.dumirc.ts, .gitignore, .github/workflows/surge-preview.yml, vercel.json
构建输出、忽略规则、Surge 预览和 Vercel 部署都改为使用 docs-dist
包脚本与格式化工具
package.json
文档部署脚本、gh-pages 调用、prettier 参数以及 cross-envpretty-quicklint-staged 相关配置被更新。
README 与资助配置
README.md, .github/FUNDING.yml
README 的标题、章节、API 表和发布说明被重写,FUNDING.yml 新增 GitHub 与 Open Collective 资助项。

持续集成与自动化

Layer / File(s) Summary
测试工作流切换
.github/workflows/main.yml, .github/workflows/react-component-ci.yml
原有测试工作流配置被移除,并新增通过可复用工作流运行测试的 react-component-ci 配置。
CodeQL 工作流更新
.github/workflows/codeql.yml
触发配置的 YAML 写法被简化,CodeQL 相关 action 改为固定提交哈希引用。
React Doctor 工作流
.github/workflows/react-doctor.yml
新增 react-doctor 工作流,包含触发条件、权限、并发控制和动作调用。

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • react-component/input#78:同样涉及将测试工作流收拢到统一的可复用 GitHub Actions 配置,并触及 .github/workflows/main.yml 的测试入口。

Poem

我是一只小兔,蹦到 docs-dist 的坡上,
预览灯一亮,工作流便排成行。
README 重新梳梳毛,脚本也换新装,
我把胡萝卜叼给构建机,咔嚓一声香。
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题与变更集一致,概括了将仓库配置标准化的主要修改。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/standardize-rc-config

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.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

❌ Deploy failed

PR preview ❌ Failed ❌ Failed
🔗 Preview https://react-component-input-preview-pr-180.surge.sh (may be unavailable)
📝 Commited2b82c
🪵 LogsView logs
📋 Build log (last lines)
npm warn exec The following package was not found and will be installed: surge@0.27.4

   Running as afc163@gmail.com (Student)

        project: ./docs-dist
         domain: react-component-input-preview-pr-180.surge.sh
           size: 49 files, 1.6 MB

   Aborted - you do not have permission to publish to react-component-input-preview-pr-180.surge.sh

🤖 Powered by surge-preview

Comment thread .github/workflows/react-component-ci.yml Fixed
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.34%. Comparing base (cd850ac) to head (ed2b82c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #180   +/-   ##
=======================================
  Coverage   98.34%   98.34%           
=======================================
  Files          11       11           
  Lines         423      423           
  Branches      136      131    -5     
=======================================
  Hits          416      416           
  Misses          7        7           

☔ View full report in Codecov by Harness.
📢 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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation, build outputs, and deployment configurations. Key changes include migrating the documentation output directory to docs-dist, adding Vercel configuration, updating the README with modern layout and API details, and removing pretty-quick in favor of updated Prettier scripts. Feedback on these changes suggests removing a duplicate .vercel entry in .gitignore, importing React in the README's ref example for copy-paste usability, and cleaning up the obsolete husky configuration block in package.json.

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.

Comment thread .gitignore Outdated
Comment on lines +47 to +48
.vercel
.vercel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The .vercel directory is duplicated in the .gitignore file. Please remove the duplicate entry.

.vercel

Comment thread README.md
Comment on lines +119 to +123
import Input, {
TextArea,
type InputRef,
type TextAreaRef,
} from '@rc-component/input';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

In the Refs example, React.useRef is used but React is not imported. Importing React will make the code snippet fully valid and copy-pasteable.

Suggested change
import Input, {
TextArea,
type InputRef,
type TextAreaRef,
} from '@rc-component/input';
import React from 'react';
import Input, {
TextArea,
type InputRef,
type TextAreaRef,
} from '@rc-component/input';

Comment thread package.json
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
"pretty-quick": "pretty-quick",
"lint-staged": "lint-staged",
"prettier": "prettier --write --ignore-unknown .",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since pretty-quick has been removed from the dependencies and scripts, the husky configuration block at the bottom of package.json (lines 80-84) is now obsolete and contains a broken reference to pretty-quick. Since this repository is using Husky v9 (which uses the .husky/ directory instead of package.json configuration), you should remove the entire husky block from package.json to clean up dead code.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/react-component-ci.yml:
- Around line 7-8: The reusable workflow reference in the CI config is pinned to
the mutable main branch instead of a fixed commit, so update the workflow call
in react-component/rc-test/.github/workflows/test-utoo.yml to use a specific
SHA-based ref rather than `@main`. Keep the existing secrets inheritance, and make
sure the only change is replacing the branch reference with an immutable commit
hash so the workflow version stays stable.
🪄 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: 9ab285b4-7301-4a40-816c-912b2f67dc8b

📥 Commits

Reviewing files that changed from the base of the PR and between cd850ac and 3663b04.

📒 Files selected for processing (11)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/workflows/codeql.yml
  • .github/workflows/main.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • README.md
  • package.json
  • vercel.json
💤 Files with no reviewable changes (1)
  • .github/workflows/main.yml

Comment on lines +7 to +8
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
secrets: inherit

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

将可复用工作流引用固定到提交哈希。

当前使用 react-component/rc-test/.github/workflows/test-utoo.yml@main 分支引用,未固定到具体提交哈希,与 PR 目标中“固定 action SHA”的要求不一致。这会导致供应链风险:main 分支上的任何变更都会自动影响本仓库的 CI,且无需经过本仓库的代码审查。

请将 @main 替换为具体的提交哈希,例如 @abc1234...

🧰 Tools
🪛 zizmor (1.26.1)

[error] 7-7: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 7-7: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow

(secrets-inherit)

🤖 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-component-ci.yml around lines 7 - 8, The reusable
workflow reference in the CI config is pinned to the mutable main branch instead
of a fixed commit, so update the workflow call in
react-component/rc-test/.github/workflows/test-utoo.yml to use a specific
SHA-based ref rather than `@main`. Keep the existing secrets inheritance, and make
sure the only change is replacing the branch reference with an immutable commit
hash so the workflow version stays stable.

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/afc163s-projects?upgradeToPro=build-rate-limit

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