Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How I built an AI bot that fixes broken npm dependencies (and how it uses GitHub Actions)

Описание и применение

AI‑бот автоматически обновляет npm‑зависимости, исправляет ошибки ESM и открывает PR только при успешном прохождении тестов.

Задача

Dependabot PRs can break builds when a library becomes ESM-only, requiring manual fixes.

Результат

The bot updated node-fetch from v2 to v3, detected an ERR_REQUIRE_ESM error, rewrote the import to use .default, and completed the process in 3 minutes, resulting in passing tests and a clean PR.

Рабочий процесс

  • Run tests before upgrade to establish baseline
  • Bump the targeted dependency
  • If tests fail, send error and source files to an LLM (Groq, Gemini, etc.)
  • LLM patches the code
  • Repeat the test‑run and patch cycle up to 3 times
  • If tests pass, open a PR with the changes
  • If tests still fail after 3 attempts, do not open a PR

Доказательства

It runs your tests before the upgrade (baseline check).

Источник

If tests fail, it sends the error and source files to an LLM (Groq, Gemini, etc).

Источник

The LLM patches the code. The cycle repeats up to 3 times.

Источник

It only opens a PR if the tests are green.

Источник

I tested it on a repo with node-fetch@2. The bot updated it to v3, saw the ERR_REQUIRE_ESM error, and automatically rewrote the file to use .default import. It took 3 minutes.

Источник

  • Дата записи: 2026-10-18T21:41:34.239Z