Is there an example of a pre-receive hook which prevents the push?

Alastair Bain July 14, 2015

We'd like to have a pre-receive hook which does some checks on the pushed content and rejects it if the tests fail.

1 answer

1 accepted

0 votes
Answer accepted
Stanislav Seletskiy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2015

Just return non-zero exit code from pre-receive hook and push will be declined.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events