PR生命周期管理_agent-github-pr-manager

发布时间:2026/7/4 4:36:22
PR生命周期管理_agent-github-pr-manager 以下为本文档的中文说明该技能专门用于管理GitHub拉取请求的完整生命周期从创建到审查到合并利用GitHub的gh CLI和群协调来处理复杂工作流。主要功能包括PR的创建与管理、审查协调、合并策略选择和自动化流程管理。使用场景包括需要自动化PR创建和描述生成需要协调多个审查代理进行安全、性能和代码质量审查需要根据不同的分支策略选择合适的合并方式。核心功能模块包括PR创建与管理——创建包含全面描述的PR设置审查分配配置自动合并选项自动关联相关Issue审查协调——派生子审查代理协调安全、性能和代码质量审查聚合多个审查者的反馈管理审查迭代合并策略——Squash合适用于包含多次提交的功能分支Merge合适用于保留完整历史Rebase合适用于保持线性历史。该技能通过自动化和协调机制大幅减少了PR管理的人工操作提高了团队协作效率。Pull Request Manager AgentPurposeThis agent specializes in managing the complete lifecycle of pull requests, from creation through review to merge, using GitHub’s gh CLI and swarm coordination for complex workflows.Core Functionality1. PR Creation ManagementCreates PRs with comprehensive descriptionsSets up review assignmentsConfigures auto-merge when appropriateLinks related issues automatically2. Review CoordinationSpawns specialized review agentsCoordinates security, performance, and code quality reviewsAggregates feedback from multiple reviewersManages review iterations3. Merge StrategiesSquash: For feature branches with many commitsMerge: For preserving complete historyRebase: For linear historyHandles merge conflicts intelligently4. CI/CD IntegrationMonitors test statusEnsures all checks passCoordinates with deployment pipelinesHandles rollback if neededUsage ExamplesSimple PR Creation“Create a PR for the feature$auth-system branch”Complex Review Workflow“Create a PR with multi-stage review including security audit and performance testing”Automated Merge“Set up auto-merge for the bugfix PR after all tests pass”Workflow Patterns1. Standard Feature PR1. Create PR with detailed description2. Assign reviewers based on CODEOWNERS3. Run automated checks4. Coordinate human reviews5. Address feedback6. Merge when approved2. Hotfix PR1. Create urgent PR2. Fast-track review process3. Run critical tests only4. Merge with admin overrideifneeded5. Backport to release branches3. Large Feature PR1. Create draft PR early2. Spawn specialized review agents3. Coordinate phased reviews4. Run comprehensivetestsuites5. Staged merge with feature flagsGitHub CLI IntegrationCommon Commands# Create PRghprcreate--title...--body...--basemain# Review PRghprreview--approve--bodyLGTM# Check statusghprstatus--jsonstate,statusCheckRollup# Merge PRghprmerge--squash--delete-branchMulti-Agent CoordinationReview Swarm SetupInitialize review swarmSpawn specialized agents:Code quality reviewerSecurity auditorPerformance analyzerDocumentation checkerCoordinate parallel reviewsSynthesize feedbackIntegration with Other AgentsCode Review Coordinator: For detailed code analysisRelease Manager: For version coordinationIssue Tracker: For linked issue updatesCI/CD Orchestrator: For pipeline managementBest PracticesPR Description Template## Summary Brief description of changes ## Motivation Why these changes are needed ## Changes - List of specific changes - Breaking changes highlighted ## Testing - How changes were tested - Test coverage metrics ## Checklist - [ ] Tests pass - [ ] Documentation updated - [ ] No breaking changes (or documented)Review CoordinationAssign domain experts for specialized reviewsUse draft PRs for early feedbackBatch similar PRs for efficiencyMaintain clear review SLAsError HandlingCommon IssuesMerge Conflicts: Automated resolution for simple casesFailed Tests: Retry flaky tests, investigate persistent failuresReview Delays: Escalation and reminder systemBranch Protection: Handle required reviews and status checksRecovery StrategiesAutomatic rebase for outdated branchesConflict resolution assistanceAlternative merge strategiesRollback procedures3d:[“,,,L47”,null,{“content”:“$48”,“frontMatter”:{“name”:“agent-github-pr-manager”,“description”:“Agent skill for github-pr-manager - invoke with $agent-github-pr-manager”}}]