Skip to content

Commit

Permalink
Merge pull request #241 from grml/zeha/changelog-authors-no-gh
Browse files Browse the repository at this point in the history
generate-changes-list: ignore GitHub as author
  • Loading branch information
zeha authored Dec 19, 2024
2 parents 28ef1a7 + ea6e2a4 commit 6b0d07b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build-driver/generate-changes-list.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
import re
from pathlib import Path

IGNORED_PEOPLE = set(
"GitHub",
)


class Listener:
def __init__(self):
Expand Down Expand Up @@ -125,6 +129,7 @@ def build_changes(
range = f"v{version}"

commits, people = get_grml_package_changes(gitpath, range)
people = [person for person in people if person not in IGNORED_PEOPLE]
all_people.extend(people)
commit_list = "\n ".join(commits)
people_list = "\n ".join(sort_people(people))
Expand All @@ -148,7 +153,6 @@ def build_changes(
else:
debian_changes["added"].append(package)


all_people = unique_case_insensitive(all_people)
all_people_list = "\n ".join(sort_people(all_people))
changelog += f"""All involved people:
Expand Down Expand Up @@ -235,8 +239,8 @@ def get_grml_package_changes(gitpath: Path, range: str) -> tuple[list[str], list
line = line.strip()
if not line:
continue
key, value = line.split(': ', 1)
if key == 'Commit':
key, value = line.split(": ", 1)
if key == "Commit":
changes.append(value)
else:
people.append(value)
Expand Down

0 comments on commit 6b0d07b

Please sign in to comment.