pr-create

Push a feature branch and generate a GitHub Pull Request from commit history.

34|12|Updated Aug 1, 2021
One-click install
npx skills add https://github.com/pear-studio/nonebot-dicepp --skill pr-create-pear-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-create
Source: https://github.com/pear-studio/nonebot-dicepp/tree/main/docs/agent/skills/pr-create
Command: npx skills add https://github.com/pear-studio/nonebot-dicepp --skill pr-create-pear-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh.

What problem does it solve?

It solves the problem of manually pushing branches and writing consistent Pull Request titles and descriptions when you just finished a change.

Core Features & Use Cases

  • Branch validation: Refuses to run on master/main and ensures you are on a feature/xxx or hotfix/xxx branch.
  • Clean workspace guard: Blocks PR creation when there are uncommitted changes, prompting you to commit first.
  • Automated PR content: Pushes the current branch, then generates a PR title from the latest commit message and a PR body from the commit range against origin/master.
  • Use case: After implementing a fix in hotfix/xxx, you can trigger this Skill to open a PR with prefilled title/body so you can review and submit faster.

Quick Start

Ask: create a Pull Request from your current feature branch using pr-create.

Frequently Asked Questions about pr-create

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

FAQPage Schema
How do I create a GitHub pull request from commit history automatically?

To create a GitHub pull request from commit history automatically, use a tool that pushes your feature branch and generates the PR title and body from the commit range against master. This requires a clean working tree and GitHub CLI authentication.

Can I create a pull request from a master or main branch?

You cannot create a pull request from a master or main branch using this workflow. Branch validation enforces that you must be on a feature/xxx or hotfix/xxx branch, refusing to run on master or main to protect the release workflow.

Do I need GitHub CLI installed and authenticated to automate pull request creation?

Yes, you need GitHub CLI (gh) installed and authenticated to automate pull request creation. The workflow executes the gh pr create command with generated fields, relying on gh CLI authentication to push branches and open pull requests on GitHub.

Why does pull request creation fail when I have uncommitted changes?

Pull request creation fails when you have uncommitted changes because a clean workspace guard blocks the process. This precaution ensures your feature branch is fully committed before pushing and generating a GitHub pull request from the commit history.

What is the best way to open a GitHub PR for a hotfix branch?

The best way to open a GitHub PR for a hotfix branch is to trigger an automated workflow after implementing your fix in hotfix/xxx. It pushes the branch and prefills the PR title and body from commit history against origin/master for faster review.