Giter VIP home page Giter VIP logo

pr-bro's Introduction

pr-bro

bro

Pull request helper script for Javascript projects. This just makes sure your tests run before pushing and that you don't try any funny business with the master branch.

INSTALL

Basically just clone this and run ln -s ~/path/to/repo/pr-bro /usr/local/bin/pr-bro.


IMPORTANT: make sure and replace ~/path/to/repo/pr-bro above to the correct path to wherever you cloned the repo.

You can test that the above worked by running:which pr-bro, which should return /usr/local/bin/pr-bro

Make sure /usr/local/bin or $HOME/bin if you prefer is on your $PATH.


use it by running pr-bro in a git repo your about to open a PR with.

FOR NPM PROJECTS: run pr-bro npm

pr-bro alone will default to running yarn test, otherwise it will run npm test so make sure those scripts in your package.json run your full test suite and your linter

NOTE: This is pretty specialized to my current team and won't fit everyone's git flow. It's pretty generic but basically if you want to tailor it to work better for you edit that

$test_command

variable to be whatever command your run for your tests.

All the script does is

  1. Check if you're on the master branch and if so prompt you for a name and checkout to a new local branch.
  2. Run your tests and if all passes then push upstream to the new branch you just made.
  3. Then you can go open your PR.

pr-bro's People

Contributors

brantstuns avatar

Stargazers

Jon Hirsch avatar brady avatar Richi Jeffery avatar James Nimlos avatar  avatar

Watchers

James Cloos avatar  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.