[infinispan-dev] Script to speed up sending pull reqs for OSX

Sanne Grinovero sanne at infinispan.org
Thu May 3 06:11:29 EDT 2012


Lol, very similar, this is what I'm using since a while; basically the
same but I have it push as well and it's cross-projects friendly:


function parse_git_branch {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/"
}

function git_project_id {
  git remote --verbose 2>/dev/null | grep origin | sed -e
"s/origin\tgit at github.com:\(.*\)\.git.*/\1/" | uniq -d
}

BRANCH=$(parse_git_branch)
PROJ=$(git_project_id)
URL=https://github.com/$PROJ/pull/new/$BRANCH
echo Prepare pull request $BRANCH to $URL
git push origin $BRANCH
firefox $URL



On 3 May 2012 11:08, Galder Zamarreño <galder at redhat.com> wrote:
> Hi,
>
> I've been playing around with a script to speed up pull req sends and I've come up with this for OSX:
>
> #!/bin/sh
> BRANCH=`git branch --no-color | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
> open -a "Google Chrome" -g https://github.com/galderz/infinispan/pull/new/${BRANCH}
>
> Basically, takes your local branch and opens a new pull req in the current Google Chrome instance.
>
> It probably can be enhanced further, thoughts?
>
> Cheers,
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev



More information about the infinispan-dev mailing list