outside-to-issue

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Outside to Issue

外部评审转Issue

Transform outside-of-diff review files into properly formatted issue files for PR review tracking.
将diff范围外的评审文件转换为格式规范的Issue文件,用于PR评审跟踪。

Overview

概述

This skill converts review files from the
outside/
directory into standardized issue files in the
issues/
directory, following the project's issue template format. The transformation preserves all metadata and automatically handles issue numbering.
本Skill将
outside/
目录下的评审文件转换为
issues/
目录下的标准化Issue文件,符合项目的Issue模板格式。转换过程会保留所有元数据,并自动处理Issue编号。

Usage

使用方法

Run the transformation script for a specific PR:
bash
scripts/transform-outside-to-issues.sh --pr <PR_NUMBER>
Example:
bash
scripts/transform-outside-to-issues.sh --pr 90
为指定PR运行转换脚本:
bash
scripts/transform-outside-to-issues.sh --pr <PR_NUMBER>
示例:
bash
scripts/transform-outside-to-issues.sh --pr 90

What It Does

功能说明

  1. Finds all outside files: Reads all
    .md
    files from
    ai-docs/reviews-pr-<PR>/outside/
    directory
  2. Determines starting issue number: Automatically finds the highest existing issue number and starts numbering from the next available number
  3. Transforms each file: Converts outside review files into issue format with:
    • Issue number and title
    • File path from the review
    • Date and status
    • Body section containing the review details
    • Footer indicating it's from outside-of-diff review
  1. 查找所有外部文件:读取
    ai-docs/reviews-pr-<PR>/outside/
    目录下的所有
    .md
    文件
  2. 确定起始Issue编号:自动查找现有最高Issue编号,从下一个可用编号开始计数
  3. 转换每个文件:将外部评审文件转换为Issue格式,包含:
    • Issue编号和标题
    • 评审对应的文件路径
    • 日期和状态
    • 包含评审详情的正文部分
    • 标明内容来自diff范围外评审的页脚

File Structure

文件结构

The script expects this directory structure:
ai-docs/reviews-pr-<PR>/
├── outside/
│   ├── 002-outside_01_<file-path>.md
│   ├── 002-outside_02_<file-path>.md
│   └── ...
└── issues/
    ├── 001-issue.md
    ├── 002-issue.md
    └── ...
脚本要求的目录结构如下:
ai-docs/reviews-pr-<PR>/
├── outside/
│   ├── 002-outside_01_<file-path>.md
│   ├── 002-outside_02_<file-path>.md
│   └── ...
└── issues/
    ├── 001-issue.md
    ├── 002-issue.md
    └── ...

Output Format

输出格式

Each transformed issue file follows this format:
markdown
undefined
每个转换后的Issue文件遵循以下格式:
markdown
undefined

Issue <NUMBER> - Outside-of-diff

Issue <NUMBER> - Outside-of-diff

File:
<file-path>
Date: <date> Status: <status>
File:
<file-path>
Date: <date> Status: <status>

Body

Body

<review-details-content>
Generated from outside-of-diff review
undefined
<review-details-content>
Generated from outside-of-diff review
undefined

Example

示例

For PR 90 with 18 outside files:
bash
scripts/transform-outside-to-issues.sh --pr 90
Output:
Created: issues/026-issue.md
Created: issues/027-issue.md
...
Created: issues/043-issue.md
Transformation complete! Created issues starting from 26
对于包含18个外部文件的PR 90:
bash
scripts/transform-outside-to-issues.sh --pr 90
输出:
Created: issues/026-issue.md
Created: issues/027-issue.md
...
Created: issues/043-issue.md
Transformation complete! Created issues starting from 26

Notes

注意事项

  • The script automatically determines the starting issue number based on existing issues
  • Files are processed in sorted order (alphabetically by filename)
  • All metadata (file path, date, status) is preserved from the original outside file
  • The Details section content becomes the Body section in the issue file
  • The script creates the
    issues/
    directory if it doesn't exist
  • 脚本会基于现有Issue自动确定起始编号
  • 文件按文件名升序顺序处理
  • 所有元数据(文件路径、日期、状态)都会从原外部文件中保留
  • 原详情部分内容会成为Issue文件的正文部分
  • 如果
    issues/
    目录不存在,脚本会自动创建

Related Commands

相关命令

  • read_pr_issues.sh
    - Read and display PR review issues
  • resolve_pr_issues.sh
    - Mark issues as resolved and update GitHub threads
  • pr-fix
    command - Fix issues for a given PR
  • read_pr_issues.sh
    - 读取并展示PR评审Issue
  • resolve_pr_issues.sh
    - 标记Issue为已解决并更新GitHub线程
  • pr-fix
    命令 - 修复指定PR的Issue