getBranchName.sh 261 B

123456789
  1. #!/bin/bash
  2. # $1: username, $2: password/token, $3: pull request number
  3. if [ -z $3 ] ; then
  4. echo "master";
  5. else
  6. curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"master"' | cut -d"\"" -f4
  7. fi