diff options
Diffstat (limited to 'git-obranch')
-rwxr-xr-x | git-obranch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/git-obranch b/git-obranch new file mode 100755 index 0000000..484aee4 --- /dev/null +++ b/git-obranch @@ -0,0 +1,16 @@ +#!/bin/sh +set -ue + +API_KEY="$(cat $(dirname $0)/gitea-api-token.txt)" + +# set -x + +[ "$#" -lt 2 ] && exit 1 + +OUT=$(osc branch -c "$1" "$2"| tail -n 2 | head -n 1) + +echo $OUT +# # Fork +# curl -X 'POST' -H 'accept: application/json' -H 'Content-Type: application/json' \ +# -H "Authorization: token $API_KEY" \ +# "https://src.opensuse.org/api/v1/repos/pool/$1/forks" |