Welcome to mirror list, hosted at ThFree Co, Russian Federation.

getBranchName.sh « analysis « scripts - github.com/nextcloud/talk-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c1fc70c952f7322a927f7c1a54ece4a61061d0d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

# $1: username
# $2: password/token
# $3: pull request number

if [ -z "$3" ] ; then
    git branch | grep '\*' | cut -d' ' -f2
else
    curl 2>/dev/null -u "$1":"$2" "https://api.github.com/repos/nextcloud/talk-android/pulls/$3" | jq .base.ref
fi