Make `name` optional parameter of Release entity
During the discussion in https://gitlab.com/gitlab-org/gitlab-ee/issues/27856, we've realized that
name parameter should be optional rather than required fileds.
In GitHub, it's actually optional parameter for overriding tag names (See https://developer.github.com/v3/repos/releases/#create-a-release). Most of the cases, users set a tag name directly as the release name e.g. https://gitlab.com/gitlab-org/gitlab-runner/-/releases.
We can allow
name to be
validates :name, presence: true, on: :create can be removed which rescues 90k invalid records on gitlab.com (See https://gitlab.com/gitlab-org/gitlab-ee/issues/27856#note_215725969)
Here is the technical/feature proposal (copied from https://gitlab.com/gitlab-org/gitlab-ee/issues/27856#note_215726036)
@sean_carroll Thanks. Actually, I'm thinking that @krasio's point is valid and we'd want to rethink what the
namerepresents. If we align with the GitHub's feature, we'd want to iron out our implementation as:
nameis optional. Users do not need to specify otherwise tag name is used.
nameis specified, the name overrides git-tag-name and it is shown in UI.
- If guest users access Releases page, we show alternative identifier instead of showing git-tag name for security reason.
- Therefore, we don't need to backfill
- We don't need AR validation nor DB constraint for
name. It can be
Can you create an issue for the further discussion with PM and UX? This seems improving usability and security concerns.
We will remove the validation