Fix parsing of edited status in Django issue script

This commit is contained in:
Bruno Alla 2021-11-20 12:10:00 +00:00
parent dfbce8afdf
commit d00e84ebef

View File

@ -193,7 +193,9 @@ class GitHubManager:
# updated packages, or known releases that will happen but haven't yet # updated packages, or known releases that will happen but haven't yet
if issue := self.existing_issues.get(needed_dj_version): if issue := self.existing_issues.get(needed_dj_version):
if index := issue.body.find(package_name): if index := issue.body.find(package_name):
name, _current, prev_compat, ok = issue.body[index:].split("|", 4)[:4] name, _current, prev_compat, ok = [
s.strip() for s in issue.body[index:].split("|", 4)[:4]
]
if ok in ("", "", "🕒"): if ok in ("", "", "🕒"):
return prev_compat, ok return prev_compat, ok
@ -272,7 +274,7 @@ class GitHubManager:
print(f"Handling GitHub issue for Django {version}") print(f"Handling GitHub issue for Django {version}")
md_content = self.generate_markdown(version) md_content = self.generate_markdown(version)
print(f"Generated markdown:\n\n{md_content}") print(f"Generated markdown:\n\n{md_content}")
self.create_or_edit_issue(version, md_content) # self.create_or_edit_issue(version, md_content)
def main() -> None: def main() -> None: