Skip to content

Creation of draft release should be possible without tag name #24690

Answered by hubuk
hubuk asked this question in API and Webhooks
Creation of draft release should be possible without tag name #24690
Oct 5, 2021 · 2 answers

I would like to create a draft release without pushing a new tag to the repository. GitHub UI currently allows creation of draft releases without specifying tag name. Is it possible to make the same behavior available via REST API?

@LordBigSky Unfortunately, REST API also does not allow creation of draft release without tag_name:

status: 422
Invalid request.

"tag_name" wasn't supplied.

However, when creating a draft release the git tag is not being created, so it is completely safe to provide tag name. I believe this was what you meant.

Replies

2 suggested answers

I know for sure that GitHub CLI is complaining about it

gh release create -d --target develop
could not create: no tag name provided

In API documentation tag_name is also marked as Required: https://docs.github.com/en/rest/reference/repos#create-a-release

@LordBigSky In fact I did not check it myself yet, but I will, thanks for response.

0 replies

@LordBigSky Unfortunately, REST API also does not allow creation of draft release without tag_name:

status: 422
Invalid request.

"tag_name" wasn't supplied.

However, when creating a draft release the git tag is not being created, so it is completely safe to provide tag name. I believe this was what you meant.

0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant