Pull Request Automation

aj-geddes/useful-ai-prompts/skills/pull-request-automation

作者 aj-geddes3f5182cfd739无许可证355 个星标收录于 2026年10月8日更新于 2026年10月8日仓库7个月前更新

Automate pull request workflows with templates, checklists, auto-merge rules, and review assignments. Reduce manual overhead and improve consistency.

AI 生成的概览

通过模板、评审分配、自动合并规则和 CI 检查自动化拉取请求工作流。

功能
该技能提供自动化拉取请求和合并请求工作流的指导与配置示例。内容涵盖 PR 模板、自动评审分配、批准后自动合并、Bors 合并自动化、PR 标题校验以及代码覆盖率要求。它还附带测试脚手架脚本和测试模板,并提供 GitHub Actions 与 GitLab 的参考指南。
适用场景
适用于标准化代码评审、执行质量门禁、自动化评审人分配或在代码仓库中设置合并自动化的场景。适合希望在 GitHub 或 GitLab 上统一 PR 实践的团队。
运行要求
需要托管在 GitHub 或 GitLab 上的 Git 仓库以及 CI/CD 配置(GitHub Actions 或 GitLab CI)。附带可执行脚本(scripts/scaffold-tests.sh)和测试模板(templates/test-template.js)。

Pull Request Automation

Table of Contents

Overview

Implement pull request automation to streamline code review processes, enforce quality standards, and reduce manual overhead through templated workflows and intelligent assignment rules.

When to Use

  • Code review standardization
  • Quality gate enforcement
  • Contributor guidance
  • Review assignment automation
  • Merge automation
  • PR labeling and organization

Quick Start

Minimal working example:

markdown
# .github/pull_request_template.md
## Description
Briefly describe the changes made in this PR.
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)- [ ] New feature (non-breaking change that adds functionality)- [ ] Breaking change (fix or feature that would cause existing functionality to change)- [ ] Documentation update
## Related Issues
Closes #(issue number)
## Changes Made
- Change 1- Change 2
## Testing
- [ ] Unit tests added/updated// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
GitHub Actions: Auto Review Assignment [blocked]GitHub Actions: Auto Review Assignment
GitHub Actions: Auto Merge on Approval [blocked]GitHub Actions: Auto Merge on Approval
GitLab Merge Request Automation [blocked]GitLab Merge Request Automation
Bors: Merge Automation Configuration [blocked]Bors: Merge Automation Configuration, Conventional Commit Validation
PR Title Validation Workflow [blocked]PR Title Validation Workflow
Code Coverage Requirement [blocked]Code Coverage Requirement

Best Practices

✅ DO

  • Use PR templates for consistency
  • Require code reviews before merge
  • Enforce CI/CD checks pass
  • Auto-assign reviewers based on code ownership
  • Label PRs for organization
  • Validate commit messages
  • Use squash commits for cleaner history
  • Set minimum coverage requirements
  • Provide detailed PR descriptions

❌ DON'T

  • Approve without reviewing code
  • Merge failing CI checks
  • Use vague PR titles
  • Skip automated checks
  • Merge to protected branches without review
  • Ignore code coverage drops
  • Force push to shared branches
  • Merge directly without PR

来源与署名

来源:aj-geddes/useful-ai-prompts位于skills/pull-request-automation提交3f5182c

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架