From 9260a81016822dedb20e9948131c151b8ded0048 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Mon, 9 Dec 2024 14:49:56 +0100 Subject: [PATCH] hack: make create-mirror-repository-pr.sh executable and easier to use --- hack/create-mirror-repository-pr.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 hack/create-mirror-repository-pr.sh diff --git a/hack/create-mirror-repository-pr.sh b/hack/create-mirror-repository-pr.sh old mode 100644 new mode 100755 index d22dc4ad87..37a46f2bcd --- a/hack/create-mirror-repository-pr.sh +++ b/hack/create-mirror-repository-pr.sh @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +PR_NUMBER="${1:-}" + if [ -z "${PR_NUMBER}" ]; then echo "PR_NUMBER must be set" exit 1 @@ -22,5 +24,4 @@ fi gh pr view "${PR_NUMBER}" \ -R kubernetes-sigs/cluster-api-provider-vsphere \ --json headRepository,headRepositoryOwner,headRefName,baseRefName \ - -q '"https://github.com/team-cluster-api/cluster-api-provider-vsphere/compare/" \ - + .baseRefName + "..." + .headRepositoryOwner.login + ":" + .headRepository.name + ":" + .headRefName' + -q '"https://github.com/team-cluster-api/cluster-api-provider-vsphere/compare/" + .baseRefName + "..." + .headRepositoryOwner.login + ":" + .headRepository.name + ":" + .headRefName'