Skip to content

Commit f1c1cfa

Browse files
committed
feat: add git-open-pr script
1 parent 39cef9e commit f1c1cfa

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

git-open-pr

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# import dependency
6+
parentPath=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
7+
. "$parentPath/os-open"
8+
9+
# Check if params are enough to go ahead.
10+
prNum=$1
11+
test -z "$prNum" && echo "Please provide pull request number to open." 1>&2 && exit 1
12+
13+
gitUserAndProject="$(git config --get remote.origin.url | cut -d : -f 2 | cut -d . -f 1)"
14+
15+
$OS_OPEN "https://github.com/$gitUserAndProject/pull/$prNum"

0 commit comments

Comments
 (0)