yshavit / loadpr

simple script for loading a PR locally

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stages the diff of a pull request locally

GitHub's ability to view pull requests online is great, but there are times I want the same diff locally (so that I can view it in my IDE). This script does just that.

To run:

  1. create a file ~/.github-token that contains a GitHub security token (and nothing else).

  2. execute this script from within your local git repo, passing along the pull request id:

    loadpr 123
    

The script will check out the PR's base commit (the branch you're merging into), then merge --no-ff --no-commit the PR's head commit (your feature branch), and finally do a git reset to unstage the changes (but keep them on your disk).

Requires bash and python.

About

simple script for loading a PR locally


Languages

Language:Shell 100.0%