From 102e556c4f176356a595616e45f40136ef9d1a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 11 Jun 2024 14:28:35 +0200 Subject: [PATCH] Patch: Propose to rebase on failing to patch --- github_app_geo_project/module/standard/patch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/github_app_geo_project/module/standard/patch.py b/github_app_geo_project/module/standard/patch.py index f9adb980a96..6cd11e07c09 100644 --- a/github_app_geo_project/module/standard/patch.py +++ b/github_app_geo_project/module/standard/patch.py @@ -146,7 +146,12 @@ async def process( if proc.returncode != 0: message.title = f"Failed to apply the diff {artifact.name}" _LOGGER.warning(message) - raise PatchException("Failed to apply the diff") + 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)