Skip to content

Commit e2a6521

Browse files
authored
fix (#26943)
1 parent 956f667 commit e2a6521

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/release_helper/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def auto_bot_advice(self):
279279
def get_target_date(self):
280280
body = self.get_issue_body()
281281
try:
282-
self.target_date = [line.split(':')[-1].strip() for line in body if 'Target release date' in line][0]
282+
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]
283283
self.date_from_target = int((time.mktime(time.strptime(self.target_date, '%Y-%m-%d')) - time.time()) / 3600 / 24)
284284
except Exception:
285285
self.target_date = 'fail to get.'

0 commit comments

Comments
 (0)