pr-writing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PR Writing

PR 编写

The helper script lives at
scripts/pr_writer.py
relative to this skill's directory (the harness resolves it). Run it from the user's repo with the script's absolute or skill-relative path:
bash
python3 <skill-dir>/scripts/pr_writer.py
辅助脚本位于此 skill 目录下的
scripts/pr_writer.py
(由 harness 解析)。在用户的代码仓库中,使用脚本的绝对路径或相对于 skill 的路径运行:
bash
python3 <skill-dir>/scripts/pr_writer.py

Steps

步骤

  1. Run helper or inspect branch. Done when source, target, commits, changed files known.
  2. Detect profile or accept
    --profile
    . Draft with Description, Test Plan, Test Result, Links. Add Screenshot only for
    frontend
    .
  3. Compose title.
    feat
    adds behavior,
    fix
    repairs,
    refactor
    restructures. Ticket in branch or commits:
    <feat|fix|refactor> [TICKET-123]: concise description
    . No ticket:
    <feat|fix|refactor> (feature-name): concise description
    .
  4. Every claim must be supported by local context. Unknowns labeled, not invented.
Completion: title follows the ticket rule, body has applicable headings, profile matches repo, unknowns labeled.
  1. 运行辅助脚本或检查分支。当源分支、目标分支、提交记录和变更文件均已明确时完成。
  2. 检测 profile,或接受
    --profile
    参数。使用 Description、Test Plan、Test Result 和 Links 起草内容。仅在
    frontend
    profile 中添加 Screenshot。
  3. 编写标题。
    feat
    表示新增行为,
    fix
    表示修复问题,
    refactor
    表示重构。分支或提交记录中包含 ticket 时:
    <feat|fix|refactor> [TICKET-123]: concise description
    。没有 ticket 时:
    <feat|fix|refactor> (feature-name): concise description
    。
  4. 每项陈述都必须有本地上下文作为依据。未知信息应明确标注,不得虚构。
完成标准:标题遵循 ticket 规则,正文包含适用的标题项,profile 与代码仓库匹配,并明确标注未知信息。

Commands

命令

bash
draft --repo-dir . [--target main] [--format toon] [--profile frontend]
bash
draft --repo-dir . [--target main] [--format toon] [--profile frontend]

Profiles

Profiles

SignalProfile
React, Next, Vue, Nuxt, Svelte, Angular, Astro, Preact, React Native
frontend
Flutter
pubspec.yaml
frontend
Dart
pubspec.yaml
dart
go.mod
go
None
generic
信号Profile
React、Next、Vue、Nuxt、Svelte、Angular、Astro、Preact、React Native
frontend
Flutter
pubspec.yaml
frontend
Dart
pubspec.yaml
dart
go.mod
go
无
generic