getBranchBase.sh 412 B

123456789101112131415
  1. #!/bin/bash
  2. # SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  3. # SPDX-FileCopyrightText: 2016 Tobias Kaminsky <tobias@kaminsky.me>
  4. # SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
  5. PR_NUMBER=$1
  6. source scripts/lib.sh
  7. if [ -z "${PR_NUMBER}" ] ; then
  8. echo "master";
  9. else
  10. curl_gh "https://api.github.com/repos/nextcloud/android/pulls/${PR_NUMBER}" | jq .base.ref
  11. fi