Skip to content

Create tag after running pre-hooks and pass updated SHA to post-hooks

What does this MR do?

It's a follow-up on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7556. Since we actually create the tag before running pre-hooks we should not check for tag existence in Gitlab::Checks::ChangeAccess. This check is not necessary, because an attempt to create a tag via UI with the same name raises Rugged::TagError: Tag already exists anyway. (NOPE)

It's a second attempt to solve #24437 (closed), because the one in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7556 leads to problems described in #24813 (closed). It changes the current behavior so we create the tag after running pre-hooks (as it should be in normal circumstances), we get tag SHA and we pass the correct value to post-hooks. Please note that this means that we pass different values to pre-hooks and post-hooks.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #24813 (closed)

Merge request reports