[go: up one dir, main page]

Skip to content

Follow-up from "Tags::CreateService: add a handler for NoRepository exception"

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem

Reported by @olaoluro: !184759 (comment 2401270623)

The following discussion from !184759 (merged) should be addressed:

  • @olaoluro started a discussion:

    issue (non-blocking): I am able to reproduce this issue only when the tag_name and message are both set i.e we set tag_name to a special character AND we have a message but when we have an empty message, we get back new_tag = false

    new_tag = repository.add_tag(current_user, "\x7f", target, nil)` 
    # which results in false and returns "Target main is invalid" to the UI

    The problem here is, the message Target main is invalid is not a correct representation of the error happening here. It's not actually a problem with the target but with the tag name containing invalid characters.

    This MR handles the Gitlab::Git::Repository::NoRepository error we get back but I think we should have a separate issue that handles specials characters in the Gitlab::GitRefValidator.

Proposal

  • Review Gitlab::GitRefValidator support for special characters. Currently, it allows them however they are blocked by Git.
Edited by 🤖 GitLab Bot 🤖