positron-pr-helper
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePositron PR Helper
Positron PR 助手
This skill helps you create comprehensive PR bodies for the posit-dev/positron repository with up-to-date e2e test tags fetched directly from the source of truth.
该工具可帮助你为posit-dev/positron仓库创建内容完整的PR正文,其中包含直接从可信源获取的最新e2e测试标签。
When to Use This Skill
何时使用该工具
Use this skill when:
- Creating a new PR and need a well-structured body
- Updating an existing PR body with the correct format
- You need the current list of e2e test tags for QA notes
- You want to ensure your PR body follows Positron conventions
在以下场景使用该工具:
- 创建新PR并需要结构清晰的正文时
- 更新现有PR正文以符合正确格式时
- 需要用于QA说明的当前e2e测试标签列表时
- 希望PR正文遵循Positron规范时
Prerequisites
前提条件
- GitHub CLI () installed and authenticated
gh - Working in the Positron repository
- Access to the repository's test-tags.ts file
- 已安装并认证GitHub CLI()
gh - 在Positron仓库中工作
- 有权访问仓库的test-tags.ts文件
Workflow
工作流程
I'll guide you through creating a comprehensive PR body:
我会引导你创建内容完整的PR正文:
Step 1: Gather Context
步骤1:收集上下文
First, I'll ask you:
- Issue number (if this PR addresses a specific issue)
- PR type (bug fix, feature, UI change, maintenance, etc.)
- Summary of what the PR does
- Screenshots needed? (for UI changes)
- Related PRs (e.g., in ark repository)
If you provide an issue number, I'll use to fetch details and understand the context better.
gh issue view首先,我会询问你:
- 问题编号(如果该PR针对特定问题)
- PR类型(bug修复、功能新增、UI变更、维护等)
- PR内容摘要
- 是否需要截图?(针对UI变更)
- 相关PR(例如ark仓库中的PR)
如果你提供问题编号,我会使用获取详情,以便更好地理解上下文。
gh issue viewStep 2: Fetch Current Test Tags
步骤2:获取当前测试标签
I'll dynamically fetch the current e2e test tags from using our extraction script. This ensures we always have the complete, up-to-date list of tags including:
test/e2e/infra/test-runner/test-tags.ts- Feature tags (functionality-specific)
- Platform tags (OS/environment control)
- Performance tags
- Special tags (critical, soft-fail)
我会使用提取脚本从中动态获取当前的e2e测试标签。这确保我们始终拥有完整、最新的标签列表,包括:
test/e2e/infra/test-runner/test-tags.ts- 功能标签(特定功能相关)
- 平台标签(操作系统/环境控制)
- 性能标签
- 特殊标签(关键、软失败)
Step 3: Generate PR Body
步骤3:生成PR正文
Based on the PR type and context, I'll create a structured PR body with:
-
Opening Line
- "Addresses #[issue]." if applicable
- Brief statement of what the PR does otherwise
-
Description/Summary
- Concise explanation of changes
- Technical context if needed
- Related PRs referenced
-
Screenshots (for UI changes only)
- Placeholder text or actual URLs if provided
-
Release Notes
- New Features (if applicable)
- Bug Fixes (if applicable)
- User-facing descriptions
-
QA Notes
- Relevant e2e test tags based on affected areas
- Testing instructions
- Code examples if helpful
根据PR类型和上下文,我会创建结构清晰的PR正文,包含以下部分:
-
开头行
- 若适用,添加“Addresses #[issue].”
- 否则,简要说明PR的作用
-
描述/摘要
- 对变更的简洁说明
- 必要的技术上下文
- 引用相关PR
-
截图(仅针对UI变更)
- 占位文本或提供的实际URL
-
发布说明
- 新功能(若适用)
- Bug修复(若适用)
- 用户视角的描述
-
QA说明
- 与受影响区域相关的e2e测试标签
- 测试说明
- 如有帮助,提供代码示例
Step 4: Output Options
步骤4:输出选项
Once the PR body is ready, you can choose:
- Copy to clipboard (Mac only) - I'll use
pbcopy - Update existing PR - I'll use
gh pr edit - Save to file - I'll write to a file of your choice
- Display only - I'll show it for manual copying
PR正文生成完成后,你可以选择:
- 复制到剪贴板(仅Mac)- 我会使用
pbcopy - 更新现有PR - 我会使用
gh pr edit - 保存到文件 - 我会写入你选择的文件
- 仅显示 - 我会展示内容供手动复制
Helper Scripts
辅助脚本
fetch-test-tags.sh
fetch-test-tags.sh
This script extracts and categorizes all test tags from the TypeScript enum:
bash
undefined该脚本从TypeScript枚举中提取并分类所有测试标签:
bash
undefinedUsage:
Usage:
./scripts/fetch-test-tags.sh [format]
./scripts/fetch-test-tags.sh [format]
format: markdown (default), json, or list
format: markdown (default), json, or list
The script:
- Parses `test-tags.ts` without needing TypeScript compilation
- Categorizes tags automatically (feature, platform, performance, special)
- Outputs in multiple formats for different use cases
- Runs quickly (<1 second)
该脚本:
- 无需TypeScript编译即可解析`test-tags.ts`
- 自动分类标签(功能、平台、性能、特殊)
- 支持多种输出格式以适配不同使用场景
- 运行速度快(<1秒)PR Body Templates
PR正文模板
I use different templates based on PR type:
我会根据PR类型使用不同的模板:
Bug Fix Template
Bug修复模板
markdown
Addresses #[issue].
[2-3 sentences explaining the fix]markdown
Addresses #[issue].
[2-3句话解释修复内容]Release Notes
Release Notes
New Features
New Features
- N/A
- N/A
Bug Fixes
Bug Fixes
- [User-facing description] (#[issue])
- [User-facing description] (#[issue])
QA Notes
QA Notes
[relevant tags]
[Simple test instructions]
undefined[relevant tags]
[Simple test instructions]
undefinedNew Feature Template
新功能模板
markdown
Addresses #[issue].markdown
Addresses #[issue].Summary
Summary
[1-2 paragraphs explaining the feature]
[Technical implementation notes if relevant]
[Related PRs if applicable]
[1-2段话解释功能]
[相关技术实现说明(若有)]
[相关PR(若适用)]
Release Notes
Release Notes
New Features
New Features
- [User-facing description] (#[issue])
- [User-facing description] (#[issue])
Bug Fixes
Bug Fixes
- N/A
- N/A
QA Notes
QA Notes
[relevant tags]
[Detailed test steps with code examples]
undefined[relevant tags]
[Detailed test steps with code examples]
undefinedExamples
示例
Example 1: Bug Fix PR
示例1:Bug修复PR
markdown
Addresses #8930.
This PR fixes the Data Explorer scrollbars snapping back to 0 on Safari. The issue was caused by incorrect event handling in the virtual scrolling implementation.markdown
Addresses #8930.
This PR fixes the Data Explorer scrollbars snapping back to 0 on Safari. The issue was caused by incorrect event handling in the virtual scrolling implementation.Release Notes
Release Notes
New Features
New Features
- N/A
- N/A
Bug Fixes
Bug Fixes
- Fix Data Explorer scrollbars snapping back to 0 on Safari (#8930)
- Fix Data Explorer scrollbars snapping back to 0 on Safari (#8930)
QA Notes
QA Notes
@:data-explorer
Open a large data frame in Data Explorer on Safari and verify scrollbars can be dragged without snapping back.
undefined@:data-explorer
Open a large data frame in Data Explorer on Safari and verify scrollbars can be dragged without snapping back.
undefinedExample 2: New Feature PR
示例2:新功能PR
markdown
Addresses #8484.markdown
Addresses #8484.Summary
Summary
Adds support for native DuckDB connections in the Connections Pane. Users can now inspect DuckDB databases directly without needing external tools. This implementation uses the native DuckDB Python API for better performance.
Related PR: posit-dev/ark#456 (adds DuckDB kernel support)
Adds support for native DuckDB connections in the Connections Pane. Users can now inspect DuckDB databases directly without needing external tools. This implementation uses the native DuckDB Python API for better performance.
Related PR: posit-dev/ark#456 (adds DuckDB kernel support)
Release Notes
Release Notes
New Features
New Features
- Added support for inspecting native DuckDB connections in the Connections Pane (#8484)
- Added support for inspecting native DuckDB connections in the Connections Pane (#8484)
Bug Fixes
Bug Fixes
- N/A
- N/A
QA Notes
QA Notes
@:connections @:duck-db
- Install DuckDB:
pip install duckdb - Create a new DuckDB connection using the modal
- Run the following to create test data:
python
conn.execute("""
CREATE TABLE employees (
id INTEGER,
name VARCHAR,
salary INTEGER
)
""")
conn.execute("INSERT INTO employees VALUES (1, 'Alice', 75000)")- Verify tables appear in the Connections pane
undefined@:connections @:duck-db
- Install DuckDB:
pip install duckdb - Create a new DuckDB connection using the modal
- Run the following to create test data:
python
conn.execute("""
CREATE TABLE employees (
id INTEGER,
name VARCHAR,
salary INTEGER
)
""")
conn.execute("INSERT INTO employees VALUES (1, 'Alice', 75000)")- Verify tables appear in the Connections pane
undefinedTips
提示
- Be concise but complete - no flowery language
- Use present tense ("fixes", "adds", "enables")
- Include issue references in parentheses in release notes
- Always include at least one e2e test tag in QA notes
- For complex changes, numbered test steps are better
- Keep release notes user-facing (avoid implementation details)
- 简洁但完整,避免冗余语言
- 使用现在时态(“fixes”、“adds”、“enables”)
- 在发布说明的括号中包含问题引用
- QA说明中至少包含一个e2e测试标签
- 对于复杂变更,编号测试步骤更合适
- 发布说明保持用户视角(避免实现细节)