From 6cd199ca80167eba024dcd66d5a4f2d1fde93ffb Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Thu, 20 Oct 2022 11:54:24 +0800 Subject: [PATCH] fix --- scripts/release_helper/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release_helper/common.py b/scripts/release_helper/common.py index 562ddd615916..25a60474d53e 100644 --- a/scripts/release_helper/common.py +++ b/scripts/release_helper/common.py @@ -279,7 +279,7 @@ def auto_bot_advice(self): def get_target_date(self): body = self.get_issue_body() try: - self.target_date = [line.split(':')[-1].strip() for line in body if 'Target release date' in line][0] + self.target_date = [re.compile(r"\d{4}-\d{1,2}-\d{1,2}").findall(l)[0] for l in body if 'Target release date' in l][0] self.date_from_target = int((time.mktime(time.strptime(self.target_date, '%Y-%m-%d')) - time.time()) / 3600 / 24) except Exception: self.target_date = 'fail to get.'