SuperAPI AI 工具集

setup-autofix-ci

办公与效率

查看项目

更新于 10-16 06:21

技能介绍

用途:为项目接入 autofix.ci,实现 CI 中自动修复代码。核心是在 .github/workflows 下新建 autofix.yml,工作流名需为 autofix.ci 以便安全识别,触发条件为 push 与 pull_request,权限 contents: read,作业在 ubuntu-latest 上运行,最后一步使用 autofix-ci/action@v1。若项目不使用 conventional commits,可删除 with 块以使用默认提交信息。

主要能力:按运行时给出配置片段。Bun 用 oven-sh/setup-bun@v2 并执行 bun install --frozen-lockfile;Yarn 需先 corepack enable,再用 actions/setup-node@v6(node-version: "lts/*",cache: "yarn"),执行 yarn install --immutable;Java 用 actions/setup-java@v5(distribution: "temurin",java-version: 25,cache: "gradle");Vite+ 用 voidzero-dev/setup-vp@v1(cache: true),setup-vp 会自动执行 vp install,无需单独安装步骤。

应用修复:先查看 package.json 等项目元数据判断所用工具。Biome 可运行 biome migrate --write 迁移 schema,例如 yarn biome migrate --write。Vite+ 通过 vp check --fix 应用 lint 与格式化修复,并用 vp exec knip --fix 应用 Knip 修复。

限制:资料未提供 autofix.ci 的收费、平台支持范围或效果保证;具体运行时版本需参照项目现有 CI 配置确定。