Skip to content

Commit

Permalink
fix (#26943)
Browse files Browse the repository at this point in the history
  • Loading branch information
msyyc authored Oct 20, 2022
1 parent 956f667 commit e2a6521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/release_helper/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down

0 comments on commit e2a6521

Please sign in to comment.