Streamline CI job pushing to Git repository
It is very useful in a variety of situations for a CI job to push commits back to the repository, but it isn't easy to setup. It can be done either with SSH using deploy keys or HTTP using personal access tokens, but it isn't easy to setup.
GitLab should make it possible to push back to the repository by simply toggling a checkbox or adding an option to the .gitlab-ci.yml
file.
Further details
Some use cases:
- automatically fixing formatting and linting errors - tools like Prettier can automatically fix issues. On the lint job failing, it should be easy to automatically commit the fixed files and push the new commits, thus triggering a fresh pipeline on the new commit.
- automatically creating new branches – using a scheduled pipeline I can pull data from an external system to update dependencies, draft blog posts or release notes. It should be easy to commit the content that has been generated and open a merge request (albeit - opening the merge request is a separate problem)
Proposal
Add a button to automatically configure deploy keys for a GitLab CI and configure the known hosts so all I have to do is set the committer name/email, commit and push.
What does success look like, and how can we measure that?
(If no way to measure success, link to an issue that will implement a way to measure this)