Code Monkey home page Code Monkey logo

github-pr's Introduction

github-pr

github-pr is a CLI utility script for working with GitHub pull requests. It's built on top of the most excellent PyGithub.

Installation:

# from pypi
pip install github-pr

# from github
pip install git+ssh://[email protected]/dataxu/github-pr.git

# from source
python setup.py install

Prerequisites:

export GITHUB_API_TOKEN=<your GitHub API token value>

Examples:

Show PRs or a specific PR

github-pr list -r dataxu/test_repo
github-pr list -r dataxu/test_repo -n 17

Create a PR

github-pr create -r dataxu/test_repo -t "PR Title" --head "my-test-branch" --body 'Description Line 1<br/>Line2'

Create a PR from a fork

github-pr create -r dataxu/test_repo -t "PR Title" --head "my-fork:my-test-branch"

Comment on a PR

github-pr comment -r dataxu/test_repo -n 17 --body ":shipit:"

Merge a PR by PR number

github-pr merge -r dataxu/test_repo -n 17

Merge a PR by branch

github-pr merge -r dataxu/test_repo --head dev-my-branch-name
github-pr merge -r dataxu/test_repo --head dev-another-branch --base branch-that-is-not-master

Delete a PR

github-pr delete -r dataxu/test_repo -n 17

This code was originally developed at DataXu and released as open source under the New BSD License.

github-pr's People

Contributors

ferrants avatar

Watchers

James Cloos avatar

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.