
Pull Request Automation
- 413 installs
- 305 repo stars
- Updated March 4, 2026
- aj-geddes/useful-ai-prompts
pull-request-automation is a Claude Code skill that automates pull request templates, reviewer assignment, labels, merge rules, and CI gates so developers who ship through GitHub or GitLab can keep review hygiene consist
About
pull-request-automation is a Claude Code skill from aj-geddes/useful-ai-prompts that helps developers wire consistent pull request workflows across GitHub and GitLab. It scaffolds PR templates with change-type checklists, links issues, and documents testing expectations, then points to six reference guides for auto review assignment, auto-merge on approval, GitLab merge request automation, Bors merge queues, PR title validation, and code-coverage requirements. The skill encodes best practices such as requiring reviews before merge, enforcing passing CI, auto-labeling PRs, validating conventional commits, and blocking coverage drops. Developers reach for pull-request-automation when review assignment is ad hoc, PR descriptions vary wildly, or merge rules need codifying in GitHub Actions or GitLab CI instead of tribal knowledge.
- Generates structured PR titles and descriptions from branch diffs
- Suggests reviewers, labels, and linked issues automatically
- Enforces review checklists and merge readiness criteria
- Integrates with CI status and conventional commit conventions
Pull Request Automation by the numbers
- 413 all-time installs (skills.sh)
- Ranked #115 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill pull-request-automationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 413 |
|---|---|
| repo stars | ★ 305 |
| Last updated | March 4, 2026 |
| Repository | aj-geddes/useful-ai-prompts ↗ |
How do you automate PR reviews and merge checks?
Automate pull request creation, descriptions, labels, reviewers, and merge checks so teams ship code faster with consistent review hygiene.
Who is it for?
Developers maintaining GitHub or GitLab repos who want templated PRs, automated reviewer routing, and enforced merge gates without writing every workflow from scratch.
Skip if: Solo repos with no review process, or teams already standardized on a fully custom internal platform unrelated to GitHub/GitLab pull requests.
When should I use this skill?
A developer asks to automate PR creation, descriptions, labels, reviewers, merge checks, or GitHub Actions/GitLab CI review workflows.
What you get
PR templates, GitHub Actions or GitLab CI workflows, reviewer assignment rules, merge automation config, and title or coverage validation jobs.
- pull_request_template.md
- Review assignment workflows
- Merge and validation CI jobs
By the numbers
- Includes six reference guides for review assignment, merge automation, and validation
- Documents PR template sections for change type, issues, changes, and testing
Files
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:
# .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:
| Guide | Contents |
|---|---|
| GitHub Actions: Auto Review Assignment | GitHub Actions: Auto Review Assignment |
| GitHub Actions: Auto Merge on Approval | GitHub Actions: Auto Merge on Approval |
| GitLab Merge Request Automation | GitLab Merge Request Automation |
| Bors: Merge Automation Configuration | Bors: Merge Automation Configuration, Conventional Commit Validation |
| PR Title Validation Workflow | PR Title Validation Workflow |
| Code Coverage Requirement | 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
Bors: Merge Automation Configuration
Bors: Merge Automation Configuration
# bors.toml
status = [
"continuous-integration/travis-ci/pr",
"continuous-integration/circleci",
"codecov/project/overall"
]
# Reviewers
reviewers = ["reviewer1", "reviewer2"]
# Block merge if status checks fail
block_labels = ["blocked", "no-merge"]
# Automatically merge if all checks pass
timeout_sec = 3600
# Delete branch after merge
delete_merged_branches = true
# Squash commits on merge
squash_commits = trueConventional Commit Validation
#!/bin/bash
# commit-msg validation script
COMMIT_MSG=$(<"$1")
# Pattern: type(scope): subject
PATTERN="^(feat|fix|docs|style|refactor|test|chore)(\([a-z\-]+\))?: .{1,50}$"
if ! [[ $COMMIT_MSG =~ $PATTERN ]]; then
echo "❌ Commit message does not follow Conventional Commits format"
echo "Format: type(scope): subject"
echo "Types: feat, fix, docs, style, refactor, test, chore"
exit 1
fi
echo "✅ Commit message format is valid"
exit 0Code Coverage Requirement
Code Coverage Requirement
# .github/workflows/coverage-check.yml
name: Coverage Check
on: [pull_request]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Run tests with coverage
run: npm run test:coverage
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: true
minimum-coverage: 80GitHub Actions: Auto Merge on Approval
GitHub Actions: Auto Merge on Approval
# .github/workflows/auto-merge.yml
name: Auto Merge PR
on:
pull_request_review:
types: [submitted]
check_suite:
types: [completed]
jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.event.review.state == 'approved'
steps:
- name: Check PR status
uses: actions/github-script@v7
with:
script: |
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
// Check if all required checks passed
const checkRuns = await github.rest.checks.listForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: pr.data.head.ref
});
const allPassed = checkRuns.data.check_runs.every(
run => run.status === 'completed' && run.conclusion === 'success'
);
if (allPassed && pr.data.approved_reviews_count >= 2) {
// Auto merge with squash strategy
await github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
merge_method: 'squash'
});
}GitHub Actions: Auto Review Assignment
GitHub Actions: Auto Review Assignment
# .github/workflows/auto-assign.yml
name: Auto Assign PR
on:
pull_request:
types: [opened, reopened]
jobs:
assign:
runs-on: ubuntu-latest
steps:
- name: Assign reviewers
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;
const reviewers = ['reviewer1', 'reviewer2', 'reviewer3'];
// Select random reviewers
const selected = reviewers.sort(() => 0.5 - Math.random()).slice(0, 2);
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
reviewers: selected
});
- name: Add labels
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;
const labels = [];
if (pr.title.startsWith('feat:')) labels.push('feature');
if (pr.title.startsWith('fix:')) labels.push('bugfix');
if (pr.title.startsWith('docs:')) labels.push('documentation');
if (labels.length > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: labels
});
}GitLab Merge Request Automation
GitLab Merge Request Automation
# .gitlab/merge_request_templates/default.md
PR Title Validation Workflow
PR Title Validation Workflow
# .github/workflows/validate-pr-title.yml
name: Validate PR Title
on:
pull_request:
types: [opened, reopened, edited]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Validate PR title format
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;
const title = pr.title;
// Pattern: type: description
const pattern = /^(feat|fix|docs|style|refactor|test|chore|perf)(\(.+\))?: .{1,80}$/;
if (!pattern.test(title)) {
core.setFailed(
'PR title must follow: type: description\n' +
'Types: feat, fix, docs, style, refactor, test, chore, perf'
);
}#!/bin/bash
# scaffold-tests.sh - Generate test file scaffolding
# Usage: ./scaffold-tests.sh <source_file> [--framework jest|pytest|mocha]
set -euo pipefail
SOURCE_FILE="${{1:?Usage: $0 <source_file> [--framework jest|pytest|mocha]}}"
FRAMEWORK="${{2:-jest}}"
echo "Scaffolding tests for: $SOURCE_FILE (framework: $FRAMEWORK)"
# TODO: Implement test scaffolding logic
# - Parse source file for exported functions/classes
# - Generate test stubs for each export
# - Include setup/teardown boilerplate
# - Add common assertion patterns
echo "Test scaffolding complete."
// Test Template
// TODO: Customize for your testing framework and project
describe('ModuleName', () => {
// Setup
beforeEach(() => {
// TODO: Add test setup
});
afterEach(() => {
// TODO: Add cleanup
});
describe('functionName', () => {
it('should handle the happy path', () => {
// TODO: Add assertion
});
it('should handle edge cases', () => {
// TODO: Add edge case tests
});
it('should handle errors gracefully', () => {
// TODO: Add error handling tests
});
});
});
Related skills
How it compares
Use pull-request-automation for repo-native PR workflow scaffolding; use a generic CI skill when you only need unrelated pipeline stages.
FAQ
Which platforms does pull-request-automation cover?
pull-request-automation covers GitHub pull requests and GitLab merge requests. Reference guides include GitHub Actions for review assignment and auto-merge, GitLab MR automation, and Bors merge-queue configuration for batched merges.
What files does pull-request-automation generate?
pull-request-automation starts with .github/pull_request_template.md and points to workflow files for reviewer assignment, title validation, coverage checks, and merge automation. Teams adapt the scaffolds to their branch protection and CI rules.