360 Secure SkillHub
360 安全技能中心

GitHub PR Automation Pro

这是一款GitHub PR自动化工具,核心功能涵盖带模板创建PR、智能打标、CI状态监控、自动评审/合并、批量操作及数据分析。典型场景:用指定模板生成PR、监控PR的CI与评审状态、自动合并达标PR、批量评审指定标签的PR。通过命令行调用,支持自定义配置规则,输出PR状态、操作结果等,适配团队PR工作流需求。

dagangtj
dagangtj
热度 57.17
最近更新 2026-05-18 12:27:29
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / DevOps / 工作流 / 任务管理 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add github-pr-automation-pro
Metadata
name
github-pr-automation
description
Automate GitHub pull request workflows including creation, review, merging, and monitoring. Handles PR templates, auto-labeling, CI/CD integration, and review automation. Use when users need to create PRs with proper formatting and templates, automate PR reviews and approvals, monitor PR status and CI checks, auto-merge PRs based on conditions, batch process multiple PRs, or track PR metrics and performance.

GitHub PR Automation

Streamline GitHub pull request workflows with intelligent automation for creation, review, and merging.

Features

  • Automated PR creation with templates
  • Smart labeling and assignment
  • CI/CD status monitoring
  • Auto-review and approval workflows
  • Conditional auto-merge
  • Batch PR operations
  • PR analytics and reporting

Quick Start

Create PR with Template

node scripts/create_pr.js --branch feature/new-api --title "Add new API endpoint" --template feature

Monitor PR Status

node scripts/monitor_pr.js --pr 123

Returns CI status, review status, and merge readiness.

Auto-merge Ready PRs

node scripts/auto_merge.js --repo owner/repo --conditions "ci_passed,reviews_approved"

Batch Review PRs

node scripts/batch_review.js --repo owner/repo --label "ready-for-review" --action approve

Configuration

PR automation rules are defined in references/automation_rules.json:

{
  "auto_label": {
    "bug": ["fix", "bugfix"],
    "feature": ["feat", "feature"],
    "docs": ["docs", "documentation"]
  },
  "auto_merge": {
    "enabled": true,
    "conditions": ["ci_passed", "reviews_approved", "no_conflicts"]
  },
  "reviewers": {
    "backend": ["@backend-team"],
    "frontend": ["@frontend-team"]
  }
}

PR Templates

Store templates in references/pr_templates/:

  • feature.md - Feature PRs
  • bugfix.md - Bug fixes
  • hotfix.md - Urgent fixes
  • docs.md - Documentation updates

GitHub CLI Integration

This skill uses gh CLI for GitHub operations. Ensure it's installed and authenticated:

gh auth status

Pricing

  • Free: Basic PR automation, 1 repository, manual triggers
  • Pro ($14.99/month): Unlimited repos, auto-triggers, advanced rules
  • Team ($49.99/month): Multi-team support, custom workflows, analytics