aboutsummaryrefslogtreecommitdiffstats
path: root/git-obranch
blob: 484aee4e0058a2e910a19d9228a1360b574a3f77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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"