# GitLab CI variables autocompletion

We keep a local copy of all supported GitLab CI variables in [`ci_variables.json`](../src/completion/ci_variables.json). This file is generated by `npm run update-ci-variables` script. The same script is used in CI (job `check-ci-variables`) to check that our local copy is up to date with the [canonical documentation](https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/ci/variables/predefined_variables.md).

## What to do when the `check-ci-variables` job starts failing

1. Checkout a new branch
1. Run `npm run update-ci-variables`
1. Commit change with message: `chore(ci variables): update the ci_variables.json`
1. Create an MR and link to this documentation for reviewer's benefit
