pr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ActivityPub PR Workflow

ActivityPub PR 工作流

Branch Naming

分支命名

PrefixUse
add/{feature}
New features
update/{feature}
Iterating on existing features
fix/{bug}
Bug fixes
try/{idea}
Experimental ideas
Reserved:
release/{X.Y.Z}
(releases only),
trunk
(main branch).
前缀用途
add/{feature}
新功能
update/{feature}
迭代现有功能
fix/{bug}
Bug修复
try/{idea}
实验性想法
保留分支:
release/{X.Y.Z}
(仅用于发布)、
trunk
(主分支)。

Pre-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
    Automattic/fediverse
    as reviewer
  • 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
undefined

Create 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 push
See 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-issue
bash
git checkout trunk && git pull origin trunk
git checkout -b fix/notification-issue

Pre-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 changed
See 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/trunk
bash
git fetch origin
git rebase origin/trunk

Resolve conflicts if any

如有冲突请解决

git push --force-with-lease
undefined
git push --force-with-lease
undefined

Special Cases

特殊情况

Hotfixes: Branch
fix/critical-issue
, minimal changes, add "Hotfix" label, request expedited review.
Experimental: Use
try/
prefix, mark as draft, get early feedback, convert to proper branch type once confirmed.
Multi-PR features: Create tracking issue, link all PRs, use consistent naming (
add/feature-part-1
, etc.), merge in order.
热修复: 使用分支
fix/critical-issue
,仅做最小变更,添加“Hotfix”标签,请求加急审核。
实验性变更: 使用
try/
前缀,标记为草稿PR,提前获取反馈,确认后转换为合适的分支类型。
多PR功能: 创建跟踪议题,关联所有PR,使用一致的命名(如
add/feature-part-1
等),按顺序合并。

Labels

标签

LabelUse
Bug
Bug fixes
Enhancement
New features
Documentation
Doc updates
Code Quality
Refactoring, cleanup, etc.
Skip Changelog
No changelog needed
Needs Review
Ready for review
In Progress
Still working
Hotfix
Urgent fix
标签用途
Bug
Bug修复
Enhancement
新功能
Documentation
文档更新
Code Quality
重构、清理等
Skip Changelog
无需添加变更日志
Needs Review
待审核
In Progress
进行中
Hotfix
紧急修复

Reference

参考

See
docs/pull-request.md
for complete workflow details.
查看
docs/pull-request.md
获取完整的工作流详情。