From cc3048c9dede463fd599bdae025e5fd65d53c543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 2 Jul 2024 08:43:10 +0200 Subject: [PATCH] Patch: commit changes when the second patch fail --- github_app_geo_project/module/standard/patch.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/github_app_geo_project/module/standard/patch.py b/github_app_geo_project/module/standard/patch.py index b408d219016..729bc487933 100644 --- a/github_app_geo_project/module/standard/patch.py +++ b/github_app_geo_project/module/standard/patch.py @@ -149,12 +149,13 @@ async def process( if proc.returncode != 0: message.title = f"Failed to apply the diff {artifact.name}" _LOGGER.warning(message) - return module.ProcessOutput( - success=False, - output={ - "summary": "Failed to apply the diff, you should probably rebase your branch" - }, - ) + if not should_push: + return module.ProcessOutput( + success=False, + output={ + "summary": "Failed to apply the diff, you should probably rebase your branch" + }, + ) message.title = f"Applied the diff {artifact.name}" _LOGGER.info(message)