Hi Marc,It's an interesting idea. I'm not aware of any specific integration to do what you're requiring. But there are some parts which I can point you to.The resilient-sdk export capability allows one to identify Resilient components, such as scripts, rules workflows, etc. to extract from Resilient into a .res file. This file can then be reimported into another Resilient using the Import settings capability under the Administrative Settings and Organization tab. Both the export and the import UI functionality use APIs calls, /configurations/exports and /configurations/imports (you can see these under the ConfigurationsREST section if the interactive API). So it's possible perform the following steps in a function:
1. call /configurations/exports to export all the customization components for an organization2. filter out only the portions of components you want to retain into it's own .res file3. use bitbucket APIs to retain the .res file
Then another function would:
4. collect a saved .res file from a bitbucket repository5. call /configuration/imports to import that component back into another Resilient.Sorry we cannot help further. Good luck.