ship

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ship Changes

发布更改

Pre-loaded context

预加载上下文

  • Status: !
    git status
  • Diff: !
    git diff HEAD
  • Log: !
    git log --oneline -10
  • 状态: !
    git status
  • 差异: !
    git diff HEAD
  • 日志: !
    git log --oneline -10

Package manager detection

包管理器检测

Check lockfile before running commands:
  • bun.lock
    bun
  • pnpm-lock.yaml
    pnpm
  • yarn.lock
    yarn
  • default →
    npm
执行命令前先检查锁文件:
  • bun.lock
    bun
  • pnpm-lock.yaml
    pnpm
  • yarn.lock
    yarn
  • 默认情况 →
    npm

Workflow

工作流程

  1. Review all changes from status and diff
  2. Analyze recent commit style from log
  3. Check for quality check commands:
    • If
      package.json
      exists, check for
      lint
      and
      test
      scripts
    • Run available checks in parallel:
      {pm} run lint
      ,
      {pm} test
    • If no package.json, skip quality checks
  4. If checks fail: report errors, STOP — do not commit or push
  5. Generate commit message based on changed files matching repo style
  6. Stage all files:
    git add -A
  7. Commit with HEREDOC format
  8. Push:
    git push
    (current branch)
  9. Run
    git status
    after to verify
  1. 查看状态和差异中的所有更改
  2. 从日志中分析近期的提交风格
  3. 检查质量检查命令:
    • 如果存在
      package.json
      ,检查其中的
      lint
      test
      脚本
    • 并行运行可用的检查:
      {pm} run lint
      ,
      {pm} test
    • 如果没有package.json,跳过质量检查
  4. 如果检查失败:报告错误,终止操作——不要提交或推送
  5. 根据更改的文件生成符合仓库风格的提交信息
  6. 暂存所有文件:
    git add -A
  7. 使用HEREDOC格式提交
  8. 推送:
    git push
    (当前分支)
  9. 之后运行
    git status
    进行验证

Rules

规则

  • Stage ALL changes with
    git add -A
  • Generate message from changed files, match repo style
  • Only run package manager commands if package.json exists with those scripts
  • NEVER push if lint or tests fail
  • NEVER force push (
    -f
    or
    --force
    )
  • NEVER skip hooks
  • NEVER commit secrets
  • Push to current branch only
  • 使用
    git add -A
    暂存所有更改
  • 根据更改的文件生成提交信息,匹配仓库风格
  • 仅当package.json中存在对应脚本时,才运行包管理器命令
  • 如果lint或测试失败,绝对不要推送
  • 绝对不要强制推送(
    -f
    --force
  • 绝对不要跳过钩子
  • 绝对不要提交机密信息
  • 仅推送到当前分支