From: David Galloway Date: Mon, 15 Jun 2026 19:51:32 +0000 (-0400) Subject: pr_only_for: Default to ceph/ceph, check GH for target branch X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f4090af255b4fcfa7e1d22072af182db1af3c838;p=ceph-build.git pr_only_for: Default to ceph/ceph, check GH for target branch In case we manually triggered the job. Signed-off-by: David Galloway --- diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index a13a442b5..907dc6ab8 100755 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -1629,6 +1629,13 @@ pr_only_for() { # receive by creating another local array ("$@") local -n local_patterns=$1 local files + # Manually-triggered jobs don't get the ghprb* variables set by the GitHub + # Pull Request Builder plugin. Assume ceph/ceph and look up the PR's target + # branch from the GitHub API. + if [ "$BUILD_CAUSE" = "MANUALTRIGGER" ]; then + ghprbGhRepository="ceph/ceph" + ghprbTargetBranch="$(curl -s -u ${GITHUB_USER}:${GITHUB_PASS} https://api.github.com/repos/${ghprbGhRepository}/pulls/${ghprbPullId} | jq -r '.base.ref')" + fi pushd . # cd to ceph repo if we need to. # The ceph-pr-commits job checks out ceph.git and ceph-build.git but most