It' not open source, but I'll try to sell the idea to our CTO. :)
Just to give you more details about its inner workings, this function is written in JavaScript that gets called when certain events come from GitHub ('pull_request', 'status', and 'push'), and uses kubectl to modify the corresponding deployments depending on the event.
Nothing fancy there, trust me.