feat(editor): auto completion for CI variables
This MR adds auto completion capabilities for CI variables in the .gitlab-ci.yml
.
All variables from the predefined variables docs page are in the newly created src/utils/gitlab_ci_variables.js
which holds the autocompletable variables.
To update the variables, you can run the following code on the doc page:
[...document.querySelector('tbody').children].map(item => [...item.children].map(subitem => subitem.textContent)).map(item => ({
label: item[0].trim(),
description: `${item[3].trim()}\n\n**GitLab Version**: ${item[1].trim()}${item[1].includes('all') ? '' : '+'}${
' \n'
}**Runner Version**: ${item[2].trim()}${item[2].includes('all') ? '' : '+'}`
}))
I know it's not pretty and might be more bad than boring
The MR also adds an entry about the CI auto completion in the README.md because I think it's a good selling point (auto completion is always cool!).
Closes #55 (closed)