Skip to content

Pass correct tag target to post-receive hook when creating tag via UI

What does this MR do?

We need to handle annotated tags that are created via GitLab UI. Annotated tags have their own SHA. We have to pass this SHA to post-receive hook to mirror what happens when someone creates an annotated tag in their local repository and pushes it via command line. In order to obtain tag SHA we first have to create it. This is a bit confusing because we create the tag before executing pre-hooks, but there is no way to create a tag outside the repository. If pre-hooks fail we have to clean up after ourselves.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Fixes #24437 (closed) Regression for8.13 - see https://gitlab.com/gitlab-org/gitlab-ce/issues/23101

Merge request reports