Skip to content

Commit f3a416c

Browse files
committed
extract_library_from_issue.sh: Improved filter on github repo URL
1 parent f4264ff commit f3a416c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extract_library_from_issue.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ -z $ISSUE ]; then
1010
fi
1111

1212
TOKEN=`cat token`
13-
REPO_URL=`curl -H "Authorization: token $TOKEN" -s -f https://api.github.com/repos/$REPO/issues/$ISSUE | jq -r .body | tr "\\r\\n" " " | egrep -o 'https?://[^ )]+' | head -n1 | sed -r 's/[/]releases[/].*//' | sed -r 's/.+\\]\\(//' | sed -r 's/[,./]$//' | sed -r 's/.git$//'`.git
13+
REPO_URL=`curl -H "Authorization: token $TOKEN" -s -f https://api.github.com/repos/$REPO/issues/$ISSUE | jq -r .body | tr "\\r\\n" " " | egrep -o 'https?://[^ )]+' | head -n1 | sed -r 's/[/]releases[/].*//' | sed -r 's/[/]tree[/].*//' | sed -r 's/.+\\]\\(//' | sed -r 's/[,./]$//' | sed -r 's/.git$//'`.git
1414

1515
echo Detected repo url is: $REPO_URL
1616
echo Press enter to continue

0 commit comments

Comments
 (0)