I'm having some trouble finding info that describes how to update the code base automatically in Gitlab
Scenario
Let's imagine a developer working on a project commits some code, but forgets to format it before committing. The .gitlab-ci.yml can have a job that will check the formatting, and display an error/warning if found. Is it possible to update the git commit with the code formatted automatically?
So the flow would be:
- Developer commits unformatted code to gitlab
- Git checks the code for formatting
- If an issue is found, git will run tool X to automatically format the code, and commit it with a git message like "Automated Git commit -- formatting"
- .gitlab-ci.yml continues as normal
Is this possible in Gitlab?