@codesherpas/ghpr

1.1.4 • Public • Published

GHPR


CLI tool to create Pull Requests on GitHub.

Features


  • Create a Pull Request from your terminal
  • Prompt users for information to be included in a Pull Request Template
  • Include output of terminal commands in Pull Request Template
  • Add labels to Pull Request

Quick Start


npm install -g @codesherpas/ghpr

Create a GitHub Access Token and add it to your Git Config

git config --global github.token <token>

Create a configuration file .ghpr.json in the root of your project.

{
    "userInputs": {
        "why": {
            "message": "Why is this change needed: "
        },
        "ticketNumber": {
            "message": "Jira ticket number: "
        }
    },
    "commands": {
        "testCoverage": "npm test"
    }
}

Add a Pull Request Template file named .github/pull_request_template.md.

## Why
<!-- describe why this change is needed -->
<%= why %>

## Test Coverage
<%= testCoverage %>

Create a pull request.

ghpr

Note: templates are rendered using ejs

Package Sidebar

Install

npm i @codesherpas/ghpr

Weekly Downloads

1

Version

1.1.4

License

ISC

Unpacked Size

177 kB

Total Files

32

Last publish

Collaborators

  • gabel0287
  • gabriel0287
  • nfinley