• Adam Niedzielski's avatar
    Pass tag SHA to post-receive hook when tag is created via UI · cf58271e
    Adam Niedzielski authored
    We only know the tag SHA after we create the tag.
    This means that we pass a different value to the hooks that happen before
    creating the tag, and a different value to the hooks that happen after
    creating the tag.
    
    This is not an ideal situation, but it is a trade-off we decided to
    make. For discussion of the alternatives please refer to
    https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7700#note_18982873
    
    "pre-receive" and "update" hooks always get the SHA of the commit
    that the tag points to. "post-receive" gets the tag SHA if it is
    an annotated tag or the commit SHA if it is an lightweight tag.
    Currently we always create annotated tags if UI is used.
    cf58271e
repository.rb 31.4 KB