LibreChat/.github/workflows
Danny Avila 9799f7e698
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
GitNexus Index / index (push) Waiting to run
GitNexus Index / post-index (push) Blocked by required conditions
🎨 ci: Check Prettier Formatting Drift on Package Changes (#13282)
Adds a `Run Prettier --check on changed files` step to the existing
`eslint-ci.yml` workflow. Same path filter (api/**, client/**,
packages/**), same changed-files detection, runs after the ESLint step.

## Why

Today there is no `prettier --check` in CI — only the local
`lint-staged` pre-commit hook runs `prettier --write`. When a PR is
merged with the hook bypassed (e.g. GitHub UI edit-and-merge, or
`git commit --no-verify`), a file can land in a non-prettier-canonical
state and nobody notices. The next contributor who stages an unrelated
change in that file then ends up with a "drive-by" prettier diff in
their PR.

`packages/api/src` had 14 such files accumulated; #13281 fixes the
existing drift. This PR closes the gap so it doesn't regrow.

## What the step does

- Detects changed JS/TS files under `api/**`, `client/**`, or
  `packages/**` against the PR base.
- Runs `npx prettier --check $CHANGED_FILES`.
- On failure, prints a `::error::` annotation telling the contributor
  how to fix it locally (`npx prettier --write <files>`).

Same one-step shape as the existing ESLint check — no extra workflow
file, no extra `npm ci`, no extra checkout.

## Ordering note

#13281 (`chore: prettier --write packages/api/src`) should land first
so the existing drift is cleared. After both PRs merge, the
pre-commit hook + this CI check together prevent drift from
re-accumulating.

## Test plan

- [x] `npx js-yaml .github/workflows/eslint-ci.yml` validates.
- [ ] CI green on this PR itself (touches only `.github/workflows/`,
  which the path filter includes, so the workflow runs on itself).
- [ ] After merge: a synthetic PR introducing prettier drift should
  fail the new step with the diagnostic message.
2026-05-23 17:53:11 -04:00
..
a11y.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
backend-review.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
build.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
cache-integration-tests.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
client.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
data-provider.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
data-schemas.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
deploy-dev.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
deploy.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
dev-branch-images.yml 🆔 feat: Built-in Build Metadata for Support Triage (#12756) 2026-05-23 09:41:13 -04:00
dev-images.yml 🆔 feat: Built-in Build Metadata for Support Triage (#12756) 2026-05-23 09:41:13 -04:00
dev-staging-images.yml 🆔 feat: Built-in Build Metadata for Support Triage (#12756) 2026-05-23 09:41:13 -04:00
docker-smoke.yml 🐳 ci: Build Docker Client Package With Data Provider Dist (#13097) 2026-05-12 15:24:41 -04:00
eslint-ci.yml 🎨 ci: Check Prettier Formatting Drift on Package Changes (#13282) 2026-05-23 17:53:11 -04:00
frontend-review.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
generate_embeddings.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
gitnexus-cleanup-pr.yml 🌊 feat: Add GitNexus DigitalOcean Pipeline with PR Index Serving (#12612) 2026-04-11 13:04:46 -04:00
gitnexus-deploy.yml 🧹 chore: Cap PR Indexes at 3 and Add Delete-Before-Sync (#12672) 2026-04-15 09:46:48 -04:00
gitnexus-index.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
gitnexus-pr-command.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
helmcharts.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
i18n-unused-keys.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
locize-i18n-sync.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00
main-image-workflow.yml 🆔 feat: Built-in Build Metadata for Support Triage (#12756) 2026-05-23 09:41:13 -04:00
tag-images.yml 🆔 feat: Built-in Build Metadata for Support Triage (#12756) 2026-05-23 09:41:13 -04:00
unused-packages.yml 🛡️ chore: Harden CI Supply Chain Workflows (#13090) 2026-05-18 16:55:25 -04:00