Windows environment variables are limited to about 32,000 characters. Data added by GitLabPushCauseData can easily exceed this length, particularly if branches have been rebased. This breaks some Python-based tools when they're run within a problematic environment.
Could this data be truncated before being added to the build environment?
Alternatively, could the environment variables be limited to those set by GitLab itself, which notably excludes variables containing commit messages, lists of affected paths, etc?