Browse Source

fixed an issue number parsing bug

master
Holger Frey 1 week ago
parent
commit
7ddc8d299a
  1. 5
      work_helpers/sg_mbp_build.py

5
work_helpers/sg_mbp_build.py

@ -100,7 +100,7 @@ def _list_current_frms(group: str, build_version: str): @@ -100,7 +100,7 @@ def _list_current_frms(group: str, build_version: str):
def _get_issue_numbers(group: str, build_version: str):
print(list(_list_current_frms(group, build_version)))
# print(list(_list_current_frms(group, build_version)))
for path in _list_current_frms(group, build_version):
rest, issue_info = path.name.lower().split("issue")
issue_info = issue_info.removeprefix("s") # might be "issues"
@ -112,9 +112,10 @@ def _extract_changes_from_log( @@ -112,9 +112,10 @@ def _extract_changes_from_log(
cwd: Pathlike, group: str, build_version: str
) -> Iterable[str]:
issue_numbers = set(_get_issue_numbers(group, build_version))
issue_search_terms = {f"#{issue}" for issue in issue_numbers}
changelog = _get_changelog_path(cwd)
for line in changelog.read_text().splitlines():
for issue in issue_numbers:
for issue in issue_search_terms:
if issue in line:
yield line

Loading…
Cancel
Save