# Create a repository with a file so it has a default branch
exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --add-readme --private
defer gh repo delete --yes $ORG/$SCRIPT_NAME-$RANDOM_STRING

# Clone the repo
exec gh repo clone $ORG/$SCRIPT_NAME-$RANDOM_STRING

# Create a release
cd $SCRIPT_NAME-$RANDOM_STRING
exec gh release create v1.0.0 --notes 'Original notes' --title 'Original Title'

# Verify the release exists
exec gh release view v1.0.0
stdout 'Original Title'

# Edit the release title
exec gh release edit v1.0.0 --title 'Updated Title'

# Verify the title changed
exec gh release view v1.0.0
stdout 'Updated Title'

# Edit the release notes
exec gh release edit v1.0.0 --notes 'Updated notes'

# Verify the notes changed
exec gh release view v1.0.0
stdout 'Updated notes'
