Skip to content

Instantly share code, notes, and snippets.

@glenux
Created May 11, 2018 13:43
Show Gist options
  • Save glenux/4038fe4040a563003279f496492395f7 to your computer and use it in GitHub Desktop.
Save glenux/4038fe4040a563003279f496492395f7 to your computer and use it in GitHub Desktop.
#!/bin/bash
org="$(git remote get-url origin |awk -F/ '{ print $4; }')"
project="$(basename "$(git rev-parse --show-toplevel)")"
branch=$(git rev-parse --abbrev-ref HEAD)
url="https://bitbucket.org/${org}/${project}/pull-request/new?source=${branch}&t=1"
xdg-open "$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment