commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCommit Workflow
提交工作流
When committing changes to this repository, follow these steps:
向本仓库提交变更时,请遵循以下步骤:
1. Build and typecheck
1. 构建与类型检查
Run both commands and ensure they pass:
bash
pnpm build && pnpm typecheckDo not proceed if either fails. Fix all errors first.
运行以下两个命令并确保它们执行成功:
bash
pnpm build && pnpm typecheck如果任一命令失败,请勿继续。请先修复所有错误。
2. Check what changed
2. 检查变更内容
bash
git status
git diff --statbash
git status
git diff --stat3. Create a changeset file
3. 创建变更集文件
IMPORTANT: The CLI package is named (NOT ).
agent-media@agent-media/cliCreate :
.changeset/<descriptive-name>.mdmarkdown
---
"agent-media": patch|minor|major
"@agent-media/core": patch|minor|major
"@agent-media/providers": patch|minor|major
"@agent-media/image": patch|minor|major
"@agent-media/audio": patch|minor|major
"@agent-media/video": patch|minor|major
---
Brief description of changesOnly include packages that were actually modified. Use:
- for bug fixes
patch - for new features (backward compatible)
minor - for breaking changes
major
重要提示: CLI包的名称为(而非)。
agent-media@agent-media/cli创建文件:
.changeset/<描述性名称>.mdmarkdown
---
"agent-media": patch|minor|major
"@agent-media/core": patch|minor|major
"@agent-media/providers": patch|minor|major
"@agent-media/image": patch|minor|major
"@agent-media/audio": patch|minor|major
"@agent-media/video": patch|minor|major
---
变更内容的简要描述仅包含实际被修改的包。请使用:
- 用于修复bug
patch - 用于添加向后兼容的新功能
minor - 用于不兼容的破坏性变更
major
4. Create feature branch
4. 创建功能分支
bash
git checkout -b feat/<descriptive-name>bash
git checkout -b feat/<描述性名称>or fix/<descriptive-name> for bug fixes
若为bug修复,使用fix/<描述性名称>
undefinedundefined5. Stage and commit
5. 暂存并提交
bash
git add <files> .changeset/<name>.md
git commit -m "feat|fix: descriptive message"bash
git add <文件> .changeset/<名称>.md
git commit -m "feat|fix: 描述性信息"6. Push and create PR
6. 推送并创建PR
bash
git push -u origin <branch-name>
gh pr create --title "..." --body "..."Note: If you need to switch GitHub accounts for PR creation, checkfor your personal account switching commands..claude.local/workflow.md
bash
git push -u origin <分支名称>
gh pr create --title "..." --body "..."注意: 如果创建PR时需要切换GitHub账户,请查看获取个人账户切换命令。.claude.local/workflow.md
Important reminders
重要提醒
- NEVER manually edit CHANGELOG.md - changesets auto-generates it
- NEVER run locally
pnpm changeset version - ALWAYS run before committing
pnpm build && pnpm typecheck - ALWAYS sync README.md to packages/cli/README.md when README changes
- 切勿手动编辑CHANGELOG.md - 变更集会自动生成该文件
- 切勿在本地运行
pnpm changeset version - 务必在提交前运行
pnpm build && pnpm typecheck - 务必当根目录README变更时,同步更新packages/cli/README.md