Command to remove GitHub Draft release
I'm trying to delete a Release in GitHub, so I'm doing
git tag -d {release-tag-name}
git push origin :{release-tag-name}
This removes the tag (local and remote) but it leaves a Draft
release in GitHub that I also want to delete.
I can delete it by login into GitHub and clicking the delete button but I want to avoid doing this through the website.
Is there a command to achieve this? I've found some other similar postings about removing tags but they all end up going to GitHub to delete the Draft
.
Edit
In this question's accepted answer Step 2 and 5 are related to my question. Step 2 says This will turn your "Release" on GitHub into a Draft that you can later delete.
while step 5 instructs to delete the Draft in GitHub's site, not trough a command.
Releases are not something git CLI can help you with.
Releases are GitHub specific thing.
You can use GitHub API to create/update/delete releases.
DELETE /repos/:owner/:repo/releases/:id
If you want to automate interaction with GitHub API you can do the following:
For example in this case you can have one script to delete local tag, call API to get tag id by name, delete remote tag and delete a release.
链接地址: http://www.djcxy.com/p/49290.html
上一篇: 如何为Maven发行版设置标签
下一篇: 删除GitHub草稿版本的命令