GithubHelp home page GithubHelp logo

cah6 / bitbucket-push-helper Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.71 MB

Wrapper around pushing to bitbucket and adding reviewers.

License: BSD 3-Clause "New" or "Revised" License

Haskell 100.00%

bitbucket-push-helper's Introduction

Bitbucket Push Helper Script

This is a small script to create Bitbucket pull request with team specific defaults.

Installation

Quick

To make this easier to use, I've pre-compiled the script for Mac. So, to get this working all you likely need to do is:

  • Clone this repo
  • Create a config in conf/ that looks like exampleConfig.json, or modify that. Or maybe check your team's slack channel for a pre-made one!
  • You're ready to use the script, passing in your config file location with -c! Still, I suggest you set up an alias so that you can easily reference this. For example, if you cloned this to your home directory, you could add the following to your ~/.bash_profile (or similar): alias pushbb="~/bitbucket-push-helper/app/PushHelper -c ~/bitbucket-push-helper/conf/myTeam.json" While you're there, set your OKTA_USERNAME and OKTA_PASSWORD:
export OKTA_USERNAME="[email protected]"
export OKTA_PASSWORD="my_password"

From source

To build from source:

  • install stack: curl -sSL https://get.haskellstack.org/ | sh
  • go to project root, run stack build and then, once that's done, stack ghc -- -O2 -threaded app/PushHelper.hs.

Usage

Once you've done your work -and committed it locally-, just use this script pushbb in replacement of git push -u origin blah.

Note that the script makes the title of the PR the first line of your latest commit, so make sure your last commit is the one that starts with your ticket information, like ANALYTICS-1111: Fix the bug in the thing.

Motivation

I got tired of the repetitive actions necessary whenever I wanted to push a local change to bitbucket and add my team members. My usual workflow was (once I've committed changes locally):

  1. git branch to see what my local branch name was, i.e. feature/christian-change-1
  2. copy that branch name
  3. type in git push -u origin then paste the branch name to run the full thing
  4. copy the location of the remote branch that bitbucket returns when you push
  5. go to my browser, paste that location, click Create pull request
  6. use a sheet of paper on my desk to remember to add ~8-10 people I add to every review, click create

This script basically does 1-3 as you would do it on the command line, and does 4-6 via bitbucket's REST api.

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.