使用github v3 API删除标签 [英] Delete a tag with github v3 API
问题描述
通过遵循其说明,我可以使用GitHub v3 API创建带注释的标签. .我先创建标记对象,然后创建ref对象.那里一切都很好.
I can create an annotated tag using the GitHub v3 API by following their directions. I create the tag object, then the ref object. Everything good there.
我可以这样删除引用:
curl -X DELETE -i -u 'myuser:mypassword' https://api.github.com/repos/:user/:repo/git/refs/tags/ben-test-310
不幸的是,这似乎还不够.如何使用API完全删除标签?
Unfortunately this doesn't seem to be sufficient. How do I fully delete the tag using the API?
推荐答案
API现在支持此功能.这被称为删除参考". (delete_ref
):
The API supports this now. It's called "deleting a ref" (delete_ref
):
https://docs.github.com/en /rest/reference/git#delete-a-reference
在这里,它也在Ruby SDK中,例如: https://octokit.github.io/octokit.rb/Octokit/Client/Refs.html
Here it is in the Ruby SDK also, just for example: https://octokit.github.io/octokit.rb/Octokit/Client/Refs.html
这篇关于使用github v3 API删除标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!