Giter Club home page Giter Club logo

hub-pr's Introduction

hub-pr

Personal workflow for handling pull requests on open-source projects

Installation

go get github.com/motemen/hub-pr

Usage

Usage: hub-pr <command> [<args>]

Commands:
    browse      Open pull request page with browser
    diff        Show pull request's diff
    checkout    Checkout a branch for a pull request
    list        List pull requests
    merge       Merge a branch of a pull request

Description

hub-pr supports a certain way handling pull requests from forked repository. Especially, it provides a way to check out the pull request locally so that you can append commits upon it.

Checking out a Pull Request branch

hub-pr checkout PULL_REQUEST_NUMBER

Will do below:

  • Add a remote pointing forked repository with the name of the pull request author

  • Check out a new branch tracking pull request’s head branch named #<PR number>-<author>/<ref>, e.g. #23-motemen/fix.

  • Stores the pull request number as branch.<branch>.prNumber into local configuration for later reference.

Merging a Pull Request branch

hub-pr merge BRANCH

Will invoke a normal git-merge with a commit message same as what will used when hitting the Merge Button on the GitHub web. The branch must be checked out with hub-pr checkout.

Showing a Pull Request’s diff

hub-pr diff

Runs "git diff" between the base and head of the Pull Reuqest corresponding current branch.

Author

motemen <[email protected]>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.