From 279affba6214cd1c6da077cab439f2fdc84c1497 Mon Sep 17 00:00:00 2001 From: Sean Spearman Date: Sat, 1 Oct 2016 15:47:49 -0700 Subject: [PATCH] Remove util functions from main file --- git-open | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/git-open b/git-open index 674eb37..cb8767d 100755 --- a/git-open +++ b/git-open @@ -135,25 +135,6 @@ else fi giturl=${giturl%\.git} -# Gets url to all PRs for branch -function getAllPrsUrl { - local giturl="$1"; - # assumes $giturl is of the form .*/user/repo - local owner=`expr "$giturl" : '.*/\(.*\)/.*$'` - local repo=`expr "$giturl" : '.*/\(.*\)$'` - # github-only solution - local allPrsUrl="https://api.github.com/repos/"$owner"/"$repo"/pulls?head="$owner":"$branch - echo $allPrsUrl; -} - -# Gets most recent PR from all PRs for branch -function getPrUrl { - local allPrsUrl="$1" - local unparsedPrUrl=$(curl -s $allPrsUrl | grep -m 1 html_url 2> /dev/null) - local prUrl=`expr "$unparsedPrUrl" : '.*\"\(.*\)\",$'` - echo $prUrl -} - if [ -n "$issue" ]; then giturl="${giturl}/issues/${issue}" elif [ -n "$pr" ]; then