Skip to content

Commit

Permalink
- Fixes from manual test.
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpojer committed Oct 1, 2024
1 parent 81dfaec commit d42079a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions release_notes_generator/record/record_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def generate(

for commit in commits:
logger.debug("DEBUG count of records is '%s'", len(records))
RecordFactory.__register_commit_to_record(records, repo, commit)
records = RecordFactory.__register_commit_to_record(records, repo, commit)
logger.debug("DEBUG count of records is '%s'", len(records))

logger.info(
Expand Down Expand Up @@ -128,7 +128,7 @@ def __register_pull_request(github: Github, records: dict[int|str, Record], repo
)

@staticmethod
def __register_commit_to_record(records: dict[int|str, Record], repo: Repository, c: Commit) -> None:
def __register_commit_to_record(records: dict[int|str, Record], repo: Repository, c: Commit) -> dict[int|str, Record]:
"""
Register a commit to a record if the commit is linked to an issue or a PR.
Expand All @@ -137,8 +137,9 @@ def __register_commit_to_record(records: dict[int|str, Record], repo: Repository
"""
for record in records.values():
if record.register_commit(c):
return
return records

iso_record = IsolatedCommitsRecord(repo)
iso_record.register_commit(c)
records[c.sha] = iso_record
records[c.sha] = IsolatedCommitsRecord(repo)
records[c.sha].register_commit(c)

return records

0 comments on commit d42079a

Please sign in to comment.