github-pr-workflow

Automates the GitHub pull request lifecycle from branch creation through CI monitoring and merge.

Updated May 4, 2026
One-click install
npx skills add https://github.com/Junkfooooood/hermes-governance --skill github-pr-workflow-junkfooooood
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-pr-workflow
Source: https://github.com/Junkfooooood/hermes-governance/tree/main/skills/github/github-pr-workflow
Command: npx skills add https://github.com/Junkfooooood/hermes-governance --skill github-pr-workflow-junkfooooood

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Managing pull requests involves many repetitive steps—branching, committing, opening PRs, watching CI, diagnosing failures, and merging—and doing them manually or inconsistently leads to errors and wasted time. This Skill provides a complete, structured workflow for the entire PR lifecycle using either the gh CLI or plain git plus the GitHub REST API. ## Core Features & Use Cases - Full PR Lifecycle Automation: Covers branch creation with naming conventions, Conventional Commits, PR creation (including drafts and reviewers), CI status monitoring, and squash/merge/rebase with branch cleanup. - Dual Auth Modes: Every operation includes both the gh CLI command and a git + curl fallback for machines without gh, with automatic detection of available credentials. - CI Failure Diagnosis and Auto-Fix Loop: Includes a troubleshooting reference for common failure patterns (tests, lint, types, builds, permissions, timeouts) and a structured loop to read logs, patch code, push, and re-verify. - Use Case: You fix a login bug on a feature branch, push it, open a PR with a structured body template, watch CI, auto-fix a failing lint check, and squash-merge with branch deletion—all guided step by step. ## Quick Start Create a branch, commit my changes with a conventional commit message, open a pull request, monitor CI, and merge it when checks pass.

Frequently Asked Questions about github-pr-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a GitHub pull request from the command line?

Use `gh pr create` with a title and body after pushing your branch with `git push -u origin HEAD`. Without the gh CLI, send a POST request to the GitHub REST API pulls endpoint with your token, specifying head branch and base branch.

How to check CI status for a pull request?

Run `gh pr checks` for a one-shot status or `gh pr checks --watch` to poll until checks finish. With curl, query the commit status endpoint and the check-runs endpoint for the branch's HEAD SHA to see each check's state and conclusion.

Can I use GitHub API without the gh CLI installed?

Yes, every operation has a curl fallback using the GitHub REST API with a GITHUB_TOKEN. The workflow auto-detects whether gh is available and authenticated, otherwise it extracts a token from environment variables or git credentials.

How do I fix failing CI checks on a pull request?

Download the failed run logs with `gh run view --log-failed` or the API logs endpoint, identify the failure pattern (test, lint, type, build, permission, or timeout), patch the code, commit, push, and re-check status. Repeat up to three attempts before asking the user.

How to enable auto-merge on a GitHub pull request?

With gh, run `gh pr merge --auto --squash --delete-branch`. Via API, auto-merge requires the GraphQL enablePullRequestAutoMerge mutation with the PR's node_id, and the repository must have auto-merge enabled in its settings.

What commit message format should I use for pull requests?

Use Conventional Commits: `type(scope): description` with types like feat, fix, refactor, docs, test, ci, chore, and perf. Add a body wrapped at 72 characters and link issues with Closes #42 in the footer.