Skip to content

chore: standardize repository config - #319

Merged
afc163 merged 37 commits into
masterfrom
codex/standardize-rc-config
Jun 29, 2026
Merged

chore: standardize repository config#319
afc163 merged 37 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.

Tracking issue: ant-design/ant-design#58514

Scope

  • Redesign README.md and README.zh-CN.md with centered title, Ant Design ecosystem branding, aligned badges, scoped Bundlephobia badge, install command, Usage, Development, Release, and License sections.
  • Standardize package metadata, GitHub repo metadata, npm package name, package entry fields, types: "./es/index.d.ts", publishConfig, and release flow through @rc-component/np.
  • Align shared dependencies and scripts for React, testing-library, Jest/Vitest where existing, TypeScript, ESLint, Prettier, Less, dumi, father, Husky, lint-staged, and Dependabot.
  • Use the shared react-component/rc-test/.github/workflows/test-utoo.yml@main workflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.
  • Keep Vercel preview configuration compatible with docs-dist output and remove legacy now-build / Cloudflare Pages residue.
  • Keep API docs, demos, tests, TypeScript checks, funding metadata, and npm package files aligned with the repository standardization matrix.

Notes

  • No breaking runtime behavior is intended.
  • React peer dependency ranges are preserved when narrowing them would be a breaking change.
  • secrets: inherit is kept until react-component/rc-test#176 is merged, then it can be narrowed to explicit CODECOV_TOKEN forwarding.

@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)
mentions Ready Ready Preview, Comment Jun 29, 2026 6:28am

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 58 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 @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 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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aec8c52a-5f4d-4bec-93d0-b86ce6c07e85

📥 Commits

Reviewing files that changed from the base of the PR and between c069e5d and 70bb3e6.

📒 Files selected for processing (14)
  • .dumirc.ts
  • .fatherrc.ts
  • .github/dependabot.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .husky/pre-commit
  • .prettierignore
  • LICENSE
  • README.md
  • README.zh-CN.md
  • package.json
  • tsconfig.json

Walkthrough

本次变更统一调整文档站输出目录与发布路径,新增和更新多个 GitHub Actions 工作流,并重写 README 与资助配置以匹配新的仓库信息。

Changes

站点构建与仓库自动化更新

Layer / File(s) Summary
构建输出与脚本
.dumirc.ts, package.json, .gitignore
构建配置改为按环境计算 base/publicPathoutputPath 改为 docs-dist,并同步更新部署脚本、格式化脚本和忽略项。
预览与托管配置
.github/workflows/surge-preview.yml, vercel.json
新增 Surge 预览工作流,并将 Vercel 配置的构建输出指向 docs-dist
CI 与安全工作流
.github/workflows/codeql.yml, .github/workflows/react-component-ci.yml
新增 CodeQL 工作流,并将现有 CI 的 contents 权限限制为只读。
React Doctor 工作流
.github/workflows/react-doctor.yml
新增 React Doctor 工作流,包含触发条件、权限、并发控制和检查步骤。
README 与资助入口
README.md, .github/FUNDING.yml
README 改为新的组件文档结构与 API 说明,并新增 GitHub Sponsors / Open Collective 资助入口。

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

我是一只兔,蹦到新站台,
docs-dist 闪闪,像胡萝卜海 🥕
CI 眨眨眼,预览轻轻开,
README 换新装,风吹也可爱,
咔嚓一声跳远点,发布到云外!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了本次对仓库配置、CI 和文档发布设置的标准化调整。
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ 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

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-mentions-preview-pr-319.surge.sh
📝 Commit70bb3e6
⏱️ Build time18.694s
📦 Size1.6 MB (no change) · 34 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 70bb3e6 · react-component-mentions-preview-pr-319.surge.sh (open ↗) · 2026-06-29 06:28:53 UTC

🤖 Powered by surge-preview

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the project configuration and documentation to support the scoped package @rc-component/mentions. Key changes include updating the build output directory to docs-dist, adding Vercel deployment configuration, introducing helper scripts in package.json, and rewriting the README.md to reflect the new package name, APIs, and usage examples. Feedback is provided regarding a duplicate .vercel entry in the .gitignore file.

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
@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.33%. Comparing base (8a718cb) to head (70bb3e6).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #319   +/-   ##
=======================================
  Coverage   98.33%   98.33%           
=======================================
  Files           8        8           
  Lines         301      301           
  Branches       79       77    -2     
=======================================
  Hits          296      296           
  Misses          5        5           

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

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@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: 3

🧹 Nitpick comments (1)
.github/workflows/react-doctor.yml (1)

27-27: 🔒 Security & Privacy | 🔵 Trivial

确认 millionco/react-doctor 的令牌配置与 Fork PR 支持限制。

github-token 并非必填输入,该 Action 会自动使用工作流的内置令牌(${{ github.token }})来发布评论和状态检查。显式传入该参数是可选的,主要用于更精细的控制。

然而,对于来自 fork 仓库的 pull_request 事件,GitHub 的内置令牌默认是只读的。即使在工作流中配置了 permissions 写入权限,也无法绕过此限制。在此场景下,该 Action 将无法发布或更新 Pull Request 评论(静默失败),尽管代码扫描本身仍可正常进行。若您的协作流程包含大量外部贡献者的 fork PR,请知悉此限制。

🤖 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 at line 27, The react-doctor workflow
step may fail silently on forked pull_request events because it relies on the
default github.token, which is read-only for forks. Update the workflow entry
using millionco/react-doctor to either explicitly configure a suitable
github-token for trusted contexts or gate/comment-disable the review-posting
behavior for fork PRs, so the action still runs without attempting to post or
update comments when permissions are insufficient.
🤖 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 @.dumirc.ts:
- Around line 5-10: The isProdSite logic is incorrectly inferring GitHub Pages
from GITHUB_ACTIONS, which causes non-Pages CI builds to use the production
base/public path. Update the .dumirc.ts path selection so isProdSite depends
only on the explicit GH_PAGES flag, and keep basePath and publicPath derived
from that single source of truth. This will prevent ordinary GitHub Actions
builds from emitting /${name}/ asset URLs unless GH_PAGES=1 is set.

In `@package.json`:
- Around line 37-39: The release flow is split incorrectly because `postpublish`
runs after `npm publish` and can fail independently, leaving the package
published but the overall release marked failed. Remove the `postpublish` hook
from the package scripts and move the `npm run gh-pages` step into a separate
release/workflow stage so `npm publish` and Pages deployment are handled as
independent steps; use the existing `prepublishOnly`, `prettier`, and `gh-pages`
script entries to locate the change.

In `@README.md`:
- Around line 91-128: The API table for MentionsProps should not reference
MentionsProps['classNames'] and MentionsProps['styles'] because it hides the
actual shape and creates a circular/self-referential description. Update the
README entry for classNames and styles to expand the concrete slot structures
from the implementation in Mentions so readers can see the exact fields
available. Keep the rest of the table unchanged and make the descriptions match
the real definitions exposed by the component.

---

Nitpick comments:
In @.github/workflows/react-doctor.yml:
- Line 27: The react-doctor workflow step may fail silently on forked
pull_request events because it relies on the default github.token, which is
read-only for forks. Update the workflow entry using millionco/react-doctor to
either explicitly configure a suitable github-token for trusted contexts or
gate/comment-disable the review-posting behavior for fork PRs, so the action
still runs without attempting to post or update comments when permissions are
insufficient.
🪄 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: 714edd43-91c8-456e-83df-513642df1482

📥 Commits

Reviewing files that changed from the base of the PR and between 8a718cb and c069e5d.

📒 Files selected for processing (10)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • README.md
  • package.json
  • vercel.json

Comment thread .dumirc.ts Outdated
Comment thread package.json Outdated
Comment thread README.md
@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

@socket-security

socket-security Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​cross-env@​10.1.010010010082100
Addednpm/​gh-pages@​6.3.09910010082100
Addednpm/​@​testing-library/​react@​15.0.710010010087100
Addednpm/​lint-staged@​16.4.010010010097100

View full report

@afc163
afc163 merged commit 3f919a1 into master Jun 29, 2026
15 checks passed
@afc163
afc163 deleted the codex/standardize-rc-config branch June 29, 2026 07:02
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