Skill站外收录 @skilllib/skill-2117939930272415335
pr-finalize
核验 Pull Request 标题与描述是否准确反映实际代码变更,提供符合规范的修改建议,并在存在会话文件时补充最终实现细节与经验总结,确保提交信息清晰可追溯。
开发运维 AI 技能
Skills.MD
# PR Finalize
Ensures PR title and description accurately reflect the implementation for a good commit message.
**Works on any PR** - Does not require agent involvement or session markdown.
## Inputs
| Input | Required | Source |
|-------|----------|--------|
| PR number | Yes | User provides |
| Session markdown | Optional | `.github/agent-pr-session/issue-XXXXX.md` or `pr-XXXXX.md` |
## Outputs
1. **Recommended PR title** - Platform prefix, behavior-focused
2. **Recommended PR description** - NOTE block + structured content
3. **Session markdown updates** (only if file exists)
## Completion Criteria
- [ ] Reviewed PR diff to understand actual implementation
- [ ] Verified title matches implementation (or recommended fix)
- [ ] Verified description matches implementation (or recommended fix)
- [ ] Checked for session markdown and updated if needed
## When to Use
- Before merging any PR
- "Finalize PR #XXXXX"
- "Check PR description for #XXXXX"
- When implementation changed during review
## When NOT to Use
- ❌ For analyzing lessons learned (use `learn-from-pr` skill instead)
- ❌ For writing or running tests (use `write-tests` or sandbox)
- ❌ For investigating why PR build failed (use `pr-build-status`)
## Constraints
- **Don't change PR title/description directly** - Only recommend changes
- **Don't modify code** - Only verify title/description accuracy
- **Match existing style** - Follow PR template format
- **Preserve user content** - Enhance, don't replace custom descriptions
---
## Workflow
### Step 1: Get PR State
```bash
gh pr view XXXXX --json title,body,files
gh pr diff XXXXX
gh pr view XXXXX --json commits --jq '.commits[].messageHeadline'
```
### Step 2: Analyze Implementation
Read the diff and understand:
- What was actually changed (not what was planned)
- Which platforms are affected
- What the fix does
### Step 3: Verify Title
| Requirement | Good | Bad |
|-------------|------|-----|
| Platform prefix (if specific) | `[iOS] Fix Shell back button` | `Fix Shell back button` |
| Describes behavior | `Fix long-press not triggering events` | `Fix #23892` |
| No noise prefixes | `[iOS] Fix...` | `[PR agent] Fix...` |
### Step 4: Verify Description
Must include:
1. NOTE block (for testing PR artifacts)
2. Description of Change (matches actual implementation)
3. Issues Fixed
Should include (for agent context):
- Root cause
- Fix approach
- Key insight
### Step 5: Session Markdown (If Exists)
```bash
ls .github/agent-pr-session/issue-XXXXX.md .github/agent-pr-session/pr-XXXXX.md 2>/dev/null
```
**If file exists:**
- Check if "Selected Fix: [PENDING]" → update with actual fix
- Add "ACTUAL IMPLEMENTED FIX" section if missing
- Document lessons learned
**If file doesn't exist:** Skip this step.
### Step 6: Present Recommendations
Output recommended title and description.
---
## Error Handling
| Situation | Action |
|-----------|--------|
| PR not found | Ask user to verify PR number |
| No session markdown | Proceed - only verify title/description |
| Title already good | Confirm it's good, no change needed |
| Description missing | Generate recommended description |
---
## Output Template
```markdown
# PR Finalize: #XXXXX
## Title Assessment
**Current:** [current title]
**Recommendation:** [recommended title, or "✅ Current title is good"]
## Description Assessment
**Issues:**
- [issue 1]
- [issue 2]
**Recommended Description:**
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you!
### Description of Change
[Brief summary matching implementation]
**Root cause:** [Why bug occurred]
**Fix:** [What code now does]
### Issues Fixed
Fixes #XXXXX
## Session Markdown
[Updated / No file exists / Already complete]
```
---
## Title Requirements
- **Platform prefix** if platform-specific: `[iOS]`, `[Android]`, `[Windows]`, `[MacCatalyst]`
- **Behavior-focused** - Describe what changed, not issue number
- **Concise** - Should fit in commit message subject line
## Description Requirements
### Required Sections
```markdown
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you!
### Description of Change
[Must match actual implementation]
### Issues Fixed
Fixes #XXXXX
```
### Recommended Additions (for agent context)
| Element | Purpose |
|---------|---------|
| **Root cause** | Why the bug occurred |
| **Fix approach** | What the code now does |
| **Key insight** | Non-obvious understanding |
| **What to avoid** | Patterns that would re-break |
---
## Session Markdown Updates (Optional)
If session markdown exists and is incomplete, add:
```markdown
## ACTUAL IMPLEMENTED FIX
**Selected Fix:** [Brief description]
**What was implemented:**
1. [What changed]
2. [Key files]
**Key insight:** [Non-obvious understanding]
## Lessons Learned
**What would have helped:**
1. [Suggestion 1]
2. [Suggestion 2]
```
---
## Common Issues
| Problem | Solution |
|---------|----------|
| Description doesn't match code | Rewrite from actual diff |
| Missing root cause | Add from issue/analysis |
| References wrong approach | Update to describe final approach |
| "Selected Fix: [PENDING]" | Document actual implementation |
---
## Example
**PR #33352** - MacCatalyst crash on window disposal
**Step 1: Get PR State**
```bash
gh pr view 33352 --json title,body,files
# Title: "Fix ObjectDisposedException in PageViewController"
# Files: PageViewController.cs
```
**Step 2: Analyze Implementation**
- Fix adds null check for window.Handler before accessing services
- Platform: MacCatalyst specific
- Prevents crash during TraitCollectionDidChange when window disposed
**Step 3: Verify Title**
- Current: "Fix ObjectDisposedException in PageViewController"
- Assessment: Missing platform prefix
- Recommended: `[MacCatalyst] Fix ObjectDisposedException in PageViewController.TraitCollectionDidChange`
**Step 4: Verify Description**
- Missing NOTE block
- Missing root cause explanation
- Generate recommended description
**Output:**
```markdown
# PR Finalize: #33352
## Title Assessment
**Current:** Fix ObjectDisposedException in PageViewController
**Recommendation:** [MacCatalyst] Fix ObjectDisposedException in PageViewController.TraitCollectionDidChange
## Description Assessment
**Issues:**
- Missing NOTE block for testing PR artifacts
- Missing root cause explanation
**Recommended Description:**
[Full description with NOTE block, root cause, fix approach...]
## Session Markdown
Updated - Added "ACTUAL IMPLEMENTED FIX" section
```
---
## Integration
- **pr-finalize** → Verify PR ready to merge (this skill)
- **learn-from-pr** → Extract lessons after finalization
- **learn-from-pr agent** → Extract lessons AND apply improvements
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「pr-finalize」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次