pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseActivityPub PR Workflow
ActivityPub PR 工作流
Branch Naming
分支命名
| Prefix | Use |
|---|---|
| New features |
| Iterating on existing features |
| Bug fixes |
| Experimental ideas |
Reserved: (releases only), (main branch).
release/{X.Y.Z}trunk| 前缀 | 用途 |
|---|---|
| 新功能 |
| 迭代现有功能 |
| Bug修复 |
| 实验性想法 |
保留分支: (仅用于发布)、(主分支)。
release/{X.Y.Z}trunkPre-PR Review
PR创建前审核
Before creating a PR, delegate to the code-review agent to review all changes on the branch. Address any critical issues before proceeding.
在创建PR之前,委托code-review agent审核分支上的所有变更。解决所有关键问题后再继续。
PR Creation
PR创建
Every PR must:
- Assign
@me - Add as reviewer
Automattic/fediverse - Include changelog entry OR "Skip Changelog" label
- Pass CI checks
- Merge cleanly with trunk
bash
undefined每个PR必须满足以下要求:
- 分配给
@me - 添加 作为审核人
Automattic/fediverse - 包含变更日志条目或添加“Skip Changelog”标签
- 通过CI检查
- 能与trunk分支干净合并
bash
undefinedCreate PR (includes required assignment/reviewer)
创建PR(包含必填的分配/审核人设置)
gh pr create --assignee @me --reviewer Automattic/fediverse
**Use the exact template from `.github/PULL_REQUEST_TEMPLATE.md`** — do not create custom formatting.gh pr create --assignee @me --reviewer Automattic/fediverse
**严格使用 `.github/PULL_REQUEST_TEMPLATE.md` 中的模板** — 不要自定义格式。Changelog
变更日志
Write changelog messages for end users, not developers. Users read these in the WordPress plugin update screen. Avoid internal jargon (OOM, batching, N+1), class names, or method names. Describe what the user experiences or what changed from their perspective.
✅ Fix automatic cleanup of old activities failing silently on sites with many items.
✅ Add a Site Health check that warns when plugins are causing too many federation updates.
❌ Fix collection purge methods to batch deletions and enforce a hard item cap.
❌ Add Site Health test to detect excessive outbox activity rates.End all changelog messages with punctuation.
Add manually if forgotten:
bash
composer changelog:add
git add . && git commit -m "Add changelog entry" && git pushSee release for complete changelog details.
变更日志消息需面向终端用户而非开发者。 用户会在WordPress插件更新界面阅读这些内容。避免使用内部术语(如OOM、批量处理、N+1)、类名或方法名。从用户的角度描述他们的体验或发生的变化。
✅ 修复了在包含大量内容的站点上,旧活动自动清理静默失败的问题。
✅ 添加了站点健康检查,当插件导致过多联邦更新时发出警告。
❌ 修复集合清理方法以批量删除并强制执行硬数量上限。(错误示例:面向开发者)
❌ 添加站点健康测试以检测过高的发件箱活动频率。(错误示例:面向开发者)所有变更日志消息末尾需添加标点符号。
如果忘记添加,可手动执行以下命令:
bash
composer changelog:add
git add . && git commit -m "Add changelog entry" && git push查看 release 获取完整的变更日志详情。
Workflow
工作流
Create Branch
创建分支
bash
git checkout trunk && git pull origin trunk
git checkout -b fix/notification-issuebash
git checkout trunk && git pull origin trunk
git checkout -b fix/notification-issuePre-Push Checks
预推送检查
bash
composer lint # PHP standards (composer lint:fix to auto-fix)
npm run lint:js # If JS changed
npm run lint:css # If CSS changed
npm run env-test # Run tests
npm run build # If assets changedSee AGENTS.md for complete commands.
bash
composer lint # PHP代码规范(使用composer lint:fix自动修复)
npm run lint:js # 若修改了JS代码
npm run lint:css # 若修改了CSS代码
npm run env-test # 运行测试
npm run build # 若修改了资源文件查看AGENTS.md获取完整命令列表。
Keep Branch Updated
保持分支更新
bash
git fetch origin
git rebase origin/trunkbash
git fetch origin
git rebase origin/trunkResolve conflicts if any
如有冲突请解决
git push --force-with-lease
undefinedgit push --force-with-lease
undefinedSpecial Cases
特殊情况
Hotfixes: Branch , minimal changes, add "Hotfix" label, request expedited review.
fix/critical-issueExperimental: Use prefix, mark as draft, get early feedback, convert to proper branch type once confirmed.
try/Multi-PR features: Create tracking issue, link all PRs, use consistent naming (, etc.), merge in order.
add/feature-part-1热修复: 使用分支 ,仅做最小变更,添加“Hotfix”标签,请求加急审核。
fix/critical-issue实验性变更: 使用 前缀,标记为草稿PR,提前获取反馈,确认后转换为合适的分支类型。
try/多PR功能: 创建跟踪议题,关联所有PR,使用一致的命名(如等),按顺序合并。
add/feature-part-1Labels
标签
| Label | Use |
|---|---|
| Bug fixes |
| New features |
| Doc updates |
| Refactoring, cleanup, etc. |
| No changelog needed |
| Ready for review |
| Still working |
| Urgent fix |
| 标签 | 用途 |
|---|---|
| Bug修复 |
| 新功能 |
| 文档更新 |
| 重构、清理等 |
| 无需添加变更日志 |
| 待审核 |
| 进行中 |
| 紧急修复 |
Reference
参考
See for complete workflow details.
docs/pull-request.md查看 获取完整的工作流详情。
docs/pull-request.md