File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,18 @@ def fetch_release_date(release):
3636 if "Created:" in p_ele :
3737 start_date = p_ele .split (" " )[1 ]+ " " + p_ele .split (" " )[2 ]
3838 break
39+ else :
40+ prefix , number = release .rsplit ("." , 1 )
41+ prev_version = prefix + "." + str (int (number ) - 1 )
42+ changelog_url = f"https://ppc64le.ocp.releases.ci.openshift.org/changelog?from={ prev_version } &to={ release } "
43+ changelog_resp = requests .get (changelog_url , verify = False , timeout = 15 )
44+ if changelog_resp .status_code == 200 :
45+ lines = changelog_resp .text .splitlines ()
46+ for line in lines :
47+ if "Created:" in line :
48+ start_date = line .split (" " )[1 ]+ " " + line .split (" " )[2 ]
49+ return start_date
50+
3951 return start_date
4052 else :
4153 print (f"Failed to get the release page. { response .text } " )
You can’t perform that action at this time.
0 commit comments