Feature: intelligent fix suggest
The jobs that we run in pipelines can sometimes fail because of 'fixable' errors: linting, code style, etc. It would be nice for GitLab to provide intelligent suggestions based on the failed jobs that can be automatically fixed.
If a job has an 'automatic' way of fixing it should:
- Highlight that in the failed job itself
- Post a new suggestion(s) in the merge request overview
We could achieve that by adding a new autofix job configuration option for the .gitlab-ci.yml file.
The result of that job should be a git patch file artifact that we could later parse and create suggestions out of it.
An example of how that config could look if we wanted to autofix the eslint job:
lint:
script: eslint
autofix: eslint --fix && git diff > autofix.patch
We could also potentially train an AI model that can fix more complex errors for us (like code completion but it replaces lines instead).
Edited by Stanislav Lashmanov