Modify script to use the project number returned by the api upon creation

This commit is contained in:
Tyler McGoffin 2024-10-25 09:03:09 -07:00
parent 7148304344
commit 7a5dc50324

View file

@ -1,10 +1,11 @@
# Create a project
exec gh project create --owner=$ORG --title='acceptance-test-project-title'
# Confirm the project has been created and get the project number
exec gh project list --owner=$ORG --format=json --jq='.projects[] | select(.title == "acceptance-test-project-title") | .number'
# Create a project and get the project number
env PROJECT_TITLE=$SCRIPT_NAME-$RANDOM_STRING
exec gh project create --owner=$ORG --title=$PROJECT_TITLE --format='json' --jq='.number'
stdout2env PROJECT_NUMBER
# Confirm the project has been created
exec gh project view --owner=$ORG $PROJECT_NUMBER
# Delete the project
exec gh project delete --owner=$ORG $PROJECT_NUMBER