Disable pre-receive hook if action was made from Web UI

Hi! I’ve written pre-receive hook that checks commit’s author, and it works globally on all projects, but I want to avoid it when actions are made from Web interface - such as merge requests. Is there any envs that go with commits that I can determine where was made action? Like $GITHAB_VIA in Github Enterprise.