Code Monkey home page Code Monkey logo

bash-git-pull-request's Introduction

bash-git-pull-request

Wrapper to automatically create pull requests on github through the command line using homebrew and hub.

Really, you should be switching to your feature/bugfix branch before starting work, but this script will pretend you are working off your base branch (such as master) before switching

Requirements

  • OSX/macOS
  • Homebrew

What does this do?

The script will:

  • Check that brew is installed
    • Check that hub is installed from brew
  • Create the new branch with the supplied branch name
    • If branch name does not begin with the prefix given in config.sh, then a random hash is prefixed to the branch name.
  • If the commit message is supplied, it will commit any changes using the commit message
    • If no commit message supplied, it will simply not commit anything
  • Push the changes to the branch on origin
  • Create the pull request (where you enter the pull request title in your command line editor)

Suggested installation

cd ~/
mkdir .bash
cd .bash
git clone https://github.com/Wilkolicious/bash-git-pull-request.git

Put the following in your .bash_profile or .bashrc, or whichever resource file.

export BASHGITPULLREQUESTS=~/.bash/bash-git-pull-request
source "${BASHGITPULLREQUESTS}/main.sh"

Now source or reload your terminal, e.g.

source ~./bash_profile

Installation should be gucci.

Usage

# USAGE: gitrequest BRANCH_NAME COMMIT_MESSAGE
gitrequest fixspellingmistakebashtest "FIX: Help page spelling mistake"

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.