diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4a945f0c65d3..143f95dc6718 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -200,5 +200,6 @@ repos: language: python additional_dependencies: - "protobuf" + stages: [push] always_run: true pass_filenames: false diff --git a/download_resources.py b/download_resources.py index 3f5e6bdacbd5..8e6ab153f679 100644 --- a/download_resources.py +++ b/download_resources.py @@ -58,4 +58,6 @@ def DownloadGerritCommitMsgHook(force=False): logging.basicConfig( level=logging.INFO, format=logging_format, datefmt='%H:%M:%S') - DownloadGerritCommitMsgHook() + is_internal = os.path.exists('internal') + if is_internal: + DownloadGerritCommitMsgHook()