Skip to content

Commit

Permalink
Update push PR script to checkout branch
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSchwert committed Aug 22, 2023
1 parent eabd09d commit 47c1eca
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/scripts/push-pr.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/bin/sh

# echo all the parameters passed to this script
echo "All parameters: $*"
echo "Version: $VERSION"

set -e
set -x

Expand All @@ -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"
Expand All @@ -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

0 comments on commit 47c1eca

Please sign in to comment.