From 47c1ecaa432564f5e1a066eb81661603114949b8 Mon Sep 17 00:00:00 2001 From: Nik Ho Date: Tue, 22 Aug 2023 18:40:37 +1200 Subject: [PATCH] Update push PR script to checkout branch --- .github/scripts/push-pr.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/scripts/push-pr.sh b/.github/scripts/push-pr.sh index 35bcf033c5..94bb53a4d3 100755 --- a/.github/scripts/push-pr.sh +++ b/.github/scripts/push-pr.sh @@ -1,9 +1,4 @@ #!/bin/sh - -# echo all the parameters passed to this script -echo "All parameters: $*" -echo "Version: $VERSION" - set -e set -x @@ -21,10 +16,13 @@ fi PR_BRANCH="release-changelog-$VERSION" +git checkout -b $PR_BRANCH + +# DELETE ME echo "Foo" >> CHANGELOG.md echo "Staging changes" -git add $* +git add CHANGELOG.md echo "Adding git commit" if git status | grep -q "Changes to be committed" @@ -38,7 +36,8 @@ then echo "Creating a pull request" gh pr create --title "Release SDK CHANGELOG $VERSION" \ --body "Updated CHANGELOG.md from ts-immutable-sdk release workflow" \ - --reviewer "$GITHUB_ACTOR" + --reviewer "$GITHUB_ACTOR" \ + --base "main" else echo "No changes detected" fi