When deleting a tag from git CLI, the correspondig release does not get deleted
Summary
When there is a release and the according tag gets deleted via the web interface, the release is being deleted automatically be GitLab. However, when a tag gets removed with the git CLI like git push origin :v1.0.0
, the release stays there and there is no reasonable way to get the release deleted as well.
Steps to reproduce
- set up CI to create a release from each tag
- push a tag to GitLab and wait for the release to be created
- delete the tag from the CLI (
git push origin :v1.0.0
) - observe that the tag has been deleted but the release remains
What is the current bug behavior?
The release stays on GitLab even though the tag is successfully deleted.
What is the expected correct behavior?
The release gets deleted together with the tag (just as if the tag had been deleted via the web interface).
Workaround
- Use Delete a Release API to delete the orphaned release.
Possible fixes
nasty workaround:
- push the old label to GitLab again:
git push origin v1.0.0
- stop the CI pipeline manually
- delete the tag via the web interface
Edited by Shinya Maeda