Skip to content

docs(repo): add contribution and review guidelines - #5

Merged
TN019 merged 9 commits into
mainfrom
docs/contribution-guidelines
Dec 1, 2026
Merged

TN019 merged 9 commits into
mainfrom
docs/contribution-guidelines

Conversation

@TN019

@TN019 TN019 commented Dec 1, 2026

Copy link
Copy Markdown

Why

Contributors need to know how to name branches and commits, which checks to run before opening a pull request, and who reviews which part of the repository.

What changed

  • Add CONTRIBUTING.md and CONTRIBUTING.zh-CN.md: <type>/<topic> branch names, type(scope): summary commit subjects, the local checks (pnpm install --frozen-lockfile, lint, typecheck, test, build, Chromium install), a Bash block that runs pnpm test:e2e with a bridge and fake gates and cleans them up, an image build check, and the review and merge rules.
  • Add CODEOWNERS: the simulator code, scripts, data and Compose files go to the simulator owners; tests, e2e, Playwright config and screenshots to Noah Williams; compose.lab.yaml to Yuki Tanaka and Noah Williams; .github/, renovate.json and CODEOWNERS to Ingrid Larsen.
  • Add .github/pull_request_template.md with the English and Chinese headings used for pull request descriptions.

How to verify

Read both guides side by side and check that the commands in them exist:

pnpm run

The list should include lint, typecheck, test, build and test:e2e.


背景

贡献者需要知道分支和提交怎么命名、发起拉取请求前要跑哪些检查,以及仓库各部分由谁评审。

改动

  • 新增 CONTRIBUTING.md 和 CONTRIBUTING.zh-CN.md:分支名用 <type>/<topic>,提交标题用 type(scope): summary;列出本地检查(pnpm install --frozen-lockfile、lint、typecheck、test、build、安装 Chromium);给出一段 Bash 代码,配合 bridge 和假闸机运行 pnpm test:e2e 并在结束后清理;说明镜像构建检查以及评审与合并规则。
  • 新增 CODEOWNERS:模拟器代码、脚本、数据和 Compose 文件归模拟器负责人;测试、e2e、Playwright 配置和截图归 Noah Williams;compose.lab.yaml 归 Yuki Tanaka 和 Noah Williams;.github/、renovate.json 和 CODEOWNERS 本身归 Ingrid Larsen。
  • 新增 .github/pull_request_template.md,包含拉取请求说明所用的中英文标题。

怎么验证

对照阅读中英文两份指南,并确认其中的命令都存在:

pnpm run

输出应包含 lint、typecheck、test、build 和 test:e2e。

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Author

Ingrid Larsen · reviewer

Does the template match the headings we use in pull request descriptions?


模板和我们在拉取请求说明里用的标题一致吗?

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Author

Mateo Rossi · author

Yes: ## Why, ## What changed, ## How to verify, a --- line, then ## 背景, ## 改动, ## 怎么验证.


一致:## Why、## What changed、## How to verify,一行 ---,然后是 ## 背景、## 改动、## 怎么验证。

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Author

Noah Williams · reviewer

Why wrap the browser-check block in a subshell instead of copying the CI step?


浏览器检查那段为什么要放进子 shell,而不是直接照搬 CI 的步骤?

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Author

Mateo Rossi · author

With set -e and the EXIT trap inside ( … ), the bridge and fake gates are killed when pnpm test:e2e finishes or fails, and the trap does not stay behind in the contributor's own shell.


把 set -e 和 EXIT trap 放在 ( … ) 里,pnpm test:e2e 无论成功还是失败结束,bridge 和假闸机都会被结束,而且这个 trap 不会留在贡献者自己的 shell 里。

@TN019
TN019 merged commit 608734d into main Dec 1, 2026
1 check failed
@TN019
TN019 deleted the docs/contribution-guidelines branch December 1, 2026 00:13
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.

1 participant