From 93e249834d360cae3e906b562d982f6c9b4a7267 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Salgado Date: Sat, 22 Jul 2023 18:01:26 +0200 Subject: [PATCH] Ensure we clean the repo before attempting to cherry-pick (#635) --- miss_islington/tasks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/miss_islington/tasks.py b/miss_islington/tasks.py index d1884a84..d42dc6ef 100644 --- a/miss_islington/tasks.py +++ b/miss_islington/tasks.py @@ -99,6 +99,11 @@ async def backport_task_asyncio( """, ) await util.assign_pr_to_core_dev(gh, issue_number, merged_by) + + # Ensure that we don't have any changes lying around + subprocess.check_output(['git', 'reset', '--hard']) + subprocess.check_output(['git', 'clean', '-fxd']) + cp = cherry_picker.CherryPicker( "origin", commit_hash,