diff --git a/mirror_from_pagure_bus.py b/mirror_from_pagure_bus.py index 82db9b7..8c3ba97 100644 --- a/mirror_from_pagure_bus.py +++ b/mirror_from_pagure_bus.py @@ -107,6 +107,16 @@ class MirrorFromPagure(object): cmd = ["git", "-c", "transfer.fsckObjects=1", "fetch"] run_command(cmd, cwd=dest_folder) + cmd = ["git", "remote"] + output = run_command(cmd, cwd=dest_folder).decode("utf-8").strip() + if output: + for remote in output.split("\n"): + _log.info(" Running git push --mirror against %s", remote) + cmd = ["git", "push", "--mirror", remote] + run_command(cmd, cwd=dest_folder) + else: + _log.info(" No remotes found") + except Exception: _log.exception("Something happened while calling git") if cnt >= 3: