I have recently stumbled upon a use-case where I want to make MRs into my master
branch automatically. Every one of those MRs would edit a documentation file which does not in any way affect business flows or local / remote app config. I unfortunately need to make an MR to trigger a webhook that talks to a different repo, instead of just committing the documentation file to master
directly.
The closest I have found to "automatically" is the merge_request.merge_when_pipeline_succeeds
push option which is available since Git 2.10. I was wondering if there is a way for me to even skip the pipeline stage as, in my case, it is useless and just wastes time. I suspect that this is not supported out of an abundance of caution, but it couldn't hurt to ask.
master
, make your commit, then push it, fast enough that you don't need to merge. You may need to adjust permissions so that the user that pushes the commit can bypass branch protection, but perhaps doing that is simpler than automating an MR.master
instead of directly pushing to it, to trigger a webhook that occurs on Merge Request events. I edited the original post to mention this, my mistake.