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 (NOPE)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.
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?
-
Changelog entry added [ ] Documentation created/updated[ ] API support added- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #24813 (closed)