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 從公開儲存庫中收錄這些內容。

檢舉或申請下架