fix(pr create): use curly brace for vars in AT

This commit is contained in:
Kynan Ware 2025-03-12 10:39:25 -06:00
parent 76de5f07ca
commit 6004fc2cd8

View file

@ -2,23 +2,23 @@
exec gh auth setup-git
# Create a repository with a file so it has a default branch
exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --add-readme --private
exec gh repo create ${ORG}/${SCRIPT_NAME}-${RANDOM_STRING} --add-readme --private
# Defer repo cleanup
defer gh repo delete --yes $ORG/$SCRIPT_NAME-$RANDOM_STRING
defer gh repo delete --yes ${ORG}/${SCRIPT_NAME}-${RANDOM_STRING}
# Clone the repo
exec gh repo clone $ORG/$SCRIPT_NAME-$RANDOM_STRING
exec gh repo clone ${ORG}/${SCRIPT_NAME}-${RANDOM_STRING}
# Prepare a branch to PR
cd $SCRIPT_NAME-$RANDOM_STRING
cd ${SCRIPT_NAME}-${RANDOM_STRING}
exec git checkout -b feature-branch
exec git commit --allow-empty -m 'Empty Commit'
exec git push -u origin feature-branch
# Leave the repo so there's no local repo
cd $WORK
cd ${WORK}
# Create the PR
exec gh pr create --title 'Feature Title' --body 'Feature Body' --repo $ORG/$SCRIPT_NAME-$RANDOM_STRING --head feature-branch
stdout https://${GH_HOST}/${ORG}/${SCRIPT_NAME}-${RANDOM_STRING}/pull/1
exec gh pr create --title 'Feature Title' --body 'Feature Body' --repo ${ORG}/${SCRIPT_NAME}-${RANDOM_STRING} --head feature-branch
stdout https://${GH_HOST}/${ORG}/${SCRIPT_NAME}-${RANDOM_STRING}/pull/1