From 989d1e4ff511f6639a61edc10cd1c46c17116e34 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 20 Jun 2022 18:52:22 -0700 Subject: [PATCH] Explicit head branch when opening forward-port PR Signed-off-by: Louise Poubel --- source-repo-scripts/merge_forward_pull_request.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source-repo-scripts/merge_forward_pull_request.bash b/source-repo-scripts/merge_forward_pull_request.bash index 8e1b8328b..befbadf28 100755 --- a/source-repo-scripts/merge_forward_pull_request.bash +++ b/source-repo-scripts/merge_forward_pull_request.bash @@ -35,6 +35,8 @@ fi set -e +CURRENT_BRANCH=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') + ORIGIN_URL=$(git remote get-url origin) ORIGIN_ORG_REPO=$(echo ${ORIGIN_URL} | sed -e 's@.*github\.com.@@') @@ -52,4 +54,5 @@ gh pr create \ --title "$TITLE" \ --repo "$ORIGIN_ORG_REPO" \ --base "$TO_BRANCH" \ - --body "$BODY" + --body "$BODY" \ + --head "$CURRENT_BRANCH"