diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-08-26 16:17:06 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-26 20:49:28 +0000 |
commit | 2019564f782b6044e345605bb42265bbb6afe1ac (patch) | |
tree | 79c6221ec367d41744f2c6d71954ccc578919673 | |
parent | e4b310f0e7d0795fab017085c1724ef1434cc2df (diff) |
create_changelog.py: Prefix [ChangeLog] entries by task number
Change-Id: Iccbaf49d0974340cc55b69fafec4a9daff05e778
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 33da1f55b92e9bcf3d7fa656f979cc5e1817bcb6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | tools/create_changelog.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/create_changelog.py b/tools/create_changelog.py index b23997cf0..f960bbb23 100644 --- a/tools/create_changelog.py +++ b/tools/create_changelog.py @@ -196,12 +196,13 @@ def extract_change_log(commit_message: List[str]) -> Tuple[str, List[str]]: result = [] component = 'pyside' within_changelog = False + task_nr = '' for line in commit_message: if within_changelog: if line: result.append(' ' + line.strip()) else: - break + within_changelog = False else: if line.startswith('[ChangeLog]'): log_line = line[11:] @@ -210,8 +211,16 @@ def extract_change_log(commit_message: List[str]) -> Tuple[str, List[str]]: if end > 0: component = log_line[1:end] log_line = log_line[end + 1:] - result.append(' - ' + log_line.strip()) + result.append(log_line.strip()) within_changelog = True + elif line.startswith("Fixes: ") or line.startswith("Task-number: "): + task_nr = line.split(":")[1].strip() + if result: + first_line = ' - ' + if task_nr: + first_line += f"[{task_nr}] " + first_line += result[0] + result[0] = first_line return (component, result) |