# This test is the same as pr-create-basic, except that the git push doesn't include the -u argument # This causes a git config read to fail during gh pr create, but it should not be fatal env REPO=${SCRIPT_NAME}-${RANDOM_STRING} # Use gh as a credential helper exec gh auth setup-git # Create a repository with a file so it has a default branch exec gh repo create ${ORG}/${REPO} --add-readme --private # Defer repo cleanup defer gh repo delete --yes ${ORG}/${REPO} # Clone the repo exec gh repo clone ${ORG}/${REPO} # Prepare a branch to PR cd ${REPO} exec git checkout -b feature-branch exec git commit --allow-empty -m 'Empty Commit' exec git push origin feature-branch # Create the PR exec gh pr create --title 'Feature Title' --body 'Feature Body' # Check the PR is indeed created exec gh pr view stdout 'Feature Title'