update_automation: move git code to a function
update_automation: move git code to a function

aspiers/automation,SUSE-Cloud/automation,aspiers/automation,aspiers/automation,gosipyan/automation,vmoravec/automation,vmoravec/automation,vmoravec/automation,gosipyan/automation,SUSE-Cloud/automation,gosipyan/automation,aspiers/automation,SUSE-Cloud/automation,SUSE-Cloud/automation,vmoravec/automation,gosipyan/automation