import {
  require_lib
} from "./chunk-QQAUZGVG.mjs";
import {
  __toESM
} from "./chunk-4OMBB3R6.mjs";

// src/detectors/ci.ts
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
};
