SERVER-33905 Only run pre-push githooks when the remote URL matches MongoDB repo
This commit is contained in:
parent
e9f87c17cc
commit
3ba2ef775d
@ -71,6 +71,13 @@ if [ ! -d "$hooks_dir" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Only run if the remote URL matches the MongoDB repo.
|
||||
url=$2
|
||||
if [ "$this_script" == "pre-push" ] && ! [[ $url =~ (mongodb|10gen)/ ]]; then
|
||||
echo "Skipping pre-push hook for non-MongoDB remote URL: $url"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
num_hooks_run=0
|
||||
all_hooks="$(/bin/ls -1 $hooks_dir 2>/dev/null)"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user