@Bean("CiConfiguration")
  public CiConfiguration provide(Configuration configuration, CiVendor[] ciVendors) {
    boolean disabled = configuration.getBoolean(PROP_DISABLED).orElse(false);
    if (disabled) {
      return new EmptyCiConfiguration();
    }

    List<CiVendor> detectedVendors = Arrays.stream(ciVendors)
      .filter(CiVendor::isDetected)
      .toList();

    if (detectedVendors.size() > 1) {
      List<String> names = detectedVendors.stream().map(CiVendor::getName).toList();
      throw MessageException.of("Multiple CI environments are detected: " + names + ". Please check environment variables or set property " + PROP_DISABLED + " to true.");
    }

    if (detectedVendors.size() == 1) {
      CiVendor vendor = detectedVendors.get(0);
      LOG.info("Auto-configuring with CI '{}'", vendor.getName());
      return vendor.loadConfiguration();
    }
    return new EmptyCiConfiguration();
  }
@Test
  public void empty_configuration_if_no_ci_vendors() {
    CiConfiguration CiConfiguration = underTest.provide(cli.asConfig(), new CiVendor[0]);

    assertThat(CiConfiguration.getScmRevision()).isEmpty();
  }