docs: protected String determineBranchName(@Nonnull Map<String, String> env) throws GitCommitIdExecutionException {
      BuildServerDataProvider buildServerDataProvider = BuildServerDataProvider.getBuildServerProvider(env,log);
      if (useBranchNameFromBuildEnvironment && !(buildServerDataProvider instanceof UnknownBuildServerData)) {
        String branchName = buildServerDataProvider.getBuildBranch();
        if (isNullOrEmpty(branchName)) {
          log.info("Detected that running on CI environment, but using repository branch, no GIT_BRANCH detected.");
          return getBranchName();
        }
        return branchName;
      } else {
        return getBranchName();
      }
    }