Skip to content

Commit 8db20d4

Browse files
committed
fix: fix code errors
Signed-off-by: Sefa Eyeoglu <[email protected]>
1 parent b3feb4e commit 8db20d4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

changelog_generator/__main__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def __init__(self, prs: List[PullRequest], category: str):
3232
self.prs = prs
3333
self.category = category
3434

35-
def merge(self, other: Change):
36-
this.prs += change.prs
35+
def merge(self, other):
36+
self.prs += other.prs
3737

3838
def pr(self):
3939
return self.prs[0]
@@ -69,6 +69,7 @@ def get_category_from_labels(labels: List[Label]):
6969
for label in labels:
7070
if label.name.startswith(LABEL_PREFIX):
7171
return label.name[len(LABEL_PREFIX) :]
72+
return "unknown"
7273

7374

7475
def categorize_pr(pr: PullRequest):
@@ -77,15 +78,15 @@ def categorize_pr(pr: PullRequest):
7778

7879

7980
def merge_child_changes(children: List[Change], parents: List[Change]):
80-
for change in merged_changes:
81+
for change in children:
8182
m = re.match(PARENT_PATTERN, change.pr().body)
8283

8384
assert m, f"'{change}' does not define a parent"
8485

8586
parent_number = int(m.group(1))
8687

8788
found_parent = False
88-
for other_change in top_level_changes:
89+
for other_change in parents:
8990
if other_change.number() == parent_number:
9091
other_change.merge(change)
9192
found_parent = True

0 commit comments

Comments
 (0)