There are two scenarios that can happen when a repository has checked the box for Enable release immutability.
Validation Failed: {"resource":"Release","code":"custom","field":"pre_receive","message":"pre_receive Repository rule violations found\n\nCannot create ref due to creations being restricted.\n\n"}, {"resource":"Release","code":"custom","field":"tag_name","message":"tag_name was used by an immutable release"}, {"resource":"Release","code":"custom","message":"Published releases must have a valid tag"}
Describe the bug
There are two scenarios that can happen when a repository has checked the box for
Enable release immutability.422 Cannot upload assets to an immutable releaseTo Reproduce
Tag already associated to immutable release
Delete tag, try to release again, it tries to create new tag with old one and can't because it was associated to an immutable release
The error is currently pretty informational
Do an immutable release that attaches assets after the release is published
It fails on the attach because the release is immutable
Expected behavior
Maybe check if the tag is already associated to an immutable release or the current error is good enough? 🤔
Create a draft release first, allow assets attach, then publish. Going to think through how we expose this to the end user.
Screenshots
No response
Additional context
No response