Add pr view test script
This commit is contained in:
parent
d7465bdf3c
commit
5ed237c65a
1 changed files with 24 additions and 0 deletions
24
acceptance/testdata/pr/pr-view.txt
vendored
Normal file
24
acceptance/testdata/pr/pr-view.txt
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Setup git
|
||||
exec gh auth setup-git
|
||||
|
||||
# Create a repo
|
||||
exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --private --add-readme
|
||||
|
||||
# Defer cleanup
|
||||
defer gh repo delete $ORG/$SCRIPT_NAME-$RANDOM_STRING --yes
|
||||
|
||||
# Clone the repo
|
||||
exec gh repo clone $ORG/$SCRIPT_NAME-$RANDOM_STRING
|
||||
|
||||
# Prepare a branch for PR
|
||||
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
|
||||
|
||||
# Create a PR
|
||||
exec gh pr create --title 'Feature Title' --body 'Feature Body'
|
||||
|
||||
# View the PR (TODO: can we somehow get the stdout of the last command)
|
||||
exec gh pr view
|
||||
stdout 'Feature Title'
|
||||
Loading…
Add table
Add a link
Reference in a new issue