-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API] Add an delete tag option to DELETE releases #12973
Comments
related to #12913 |
I think this can be done as in query option? github does not have this option so we are free to invent one |
From what I can tell, there isn't really a defined standard. You can send query parameters and you can send a body with a DELETE request, however it is not in the spec (from what I could tell) and so it would be somewhat undefined territory. I think, unfortunately, this should probably be delegated to #12913 and will require two API calls to completely remove a release and tag. On another note, the UI should also provide the option to retain the tag, for some of the reasons mentioned below relating to git. I think this is fine when considering git has no concept of a release (it as a construct made up by services like ourselves and GH). Releases are tied to tags, thus creating a release means creating the required tag as well. |
Resolved with #13358 |
When the release is deleted via the web interface the tag is deleted
When the release is deleted via the API the tag is not deleted
The DeleteReleaseByID function already has an argument to either delete or not the tag.
that argument is set to true when called from the web interface
gitea/routers/repo/release.go
Line 353 in 3878e98
and to false when called from the API
gitea/routers/api/v1/repo/release.go
Line 333 in 3878e98
that'd be nice we could decide wether or not we want to delete the tag whith the API call
Thanks in advance
The text was updated successfully, but these errors were encountered: