Support tag pushes in pre_commit_run

Currently pre_commit_run fails in pipelines in response to tag pushes:

.gitlab-ci.pre-commit-run.bash: line 24: CI_COMMIT_BRANCH: unbound variable