aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-08-26 16:17:06 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-08-26 20:08:10 +0200
commit33da1f55b92e9bcf3d7fa656f979cc5e1817bcb6 (patch)
tree7b0fd239a2b128fba5bcca4020f9d9f056d5c6a2 /tools
parente0848b2d644574e914d3f71c1fe4b309e39ac099 (diff)
create_changelog.py: Prefix [ChangeLog] entries by task number
Pick-to: 5.15 6.1 Change-Id: Iccbaf49d0974340cc55b69fafec4a9daff05e778 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/create_changelog.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/create_changelog.py b/tools/create_changelog.py
index b93d16ae2..3f364377c 100644
--- a/tools/create_changelog.py
+++ b/tools/create_changelog.py
@@ -219,12 +219,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:]
@@ -233,8 +234,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)