Commit graph

7 commits

Author SHA1 Message Date
Lin Jen-Shin
05f4e48a4c Make GitHooksService#execute return block value
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_21627207
2017-01-26 19:35:19 +08:00
Adam Niedzielski
cf58271e11 Pass tag SHA to post-receive hook when tag is created via UI
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.
2016-11-28 15:04:51 +01:00
Valery Sizov
bf218337ed Better message for git hooks and file locks 2016-07-04 15:31:49 +03:00
Jacob Vosmaer
c32e61251e Get rid of Gitlab::ShellEnv 2016-06-15 14:59:37 +02:00
Rubén Dávila
5e6a5270d5 Raise the exception from #execute instead of #run_hook. #1156 #3069 2015-12-03 09:39:15 -05:00
Rubén Dávila
338eb2c41e Call update hook from new GitHooksService class. #3069 2015-12-03 09:39:15 -05:00
Rubén Dávila
5145706c82 Run custom Git hooks when creating or deleting branches through the UI. #1156 2015-12-03 09:39:15 -05:00