import {
  require_lib
} from "./chunk-RIIQA6S6.mjs";
import {
  init_esm_shims
} from "./chunk-RDFZ4GVM.mjs";
import {
  __toESM
} from "./chunk-7KF2HEU2.mjs";

// src/detectors/ci.ts
init_esm_shims();
var import_fs_extra = __toESM(require_lib());
import path from "path";
async function detectCI(repoPath) {
  if (await import_fs_extra.default.pathExists(path.join(repoPath, ".github/workflows"))) {
    return { name: "GitHub Actions", logo: "ci/githubactions.svg", type: "ci" };
  }
  if (await import_fs_extra.default.pathExists(path.join(repoPath, ".gitlab-ci.yml"))) {
    return { name: "GitLab CI", logo: "ci/gitlab.svg", type: "ci" };
  }
  if (await import_fs_extra.default.pathExists(path.join(repoPath, ".circleci"))) {
    return { name: "CircleCI", logo: "ci/circleci.svg", type: "ci" };
  }
  if (await import_fs_extra.default.pathExists(path.join(repoPath, ".travis.yml"))) {
    return { name: "Travis CI", logo: "ci/travisci.svg", type: "ci" };
  }
  if (await import_fs_extra.default.pathExists(path.join(repoPath, "azure-pipelines.yml"))) {
    return { name: "Azure Pipelines", logo: "ci/azurepipelines.svg", type: "ci" };
  }
  return null;
}

export {
  detectCI
};
