Skip to content

Commit 9e384fa

Browse files
committed
Handle missing login in changelog generate script
Noticed during apache#1822 that the script initially failed due to [this commit](apache@10cf7c1) no longer having the associated GitHub user. Updates the script to skip the username referencing in such cases.
1 parent 87d1907 commit 9e384fa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dev/release/generate-changelog.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def print_pulls(repo_name, title, pulls):
2828
print()
2929
for (pull, commit) in pulls:
3030
url = "https://github.com/{}/pull/{}".format(repo_name, pull.number)
31-
print("- {} [#{}]({}) ({})".format(pull.title, pull.number, url, commit.author.login))
31+
author = f"({commit.author.login})" if commit.author else ''
32+
print("- {} [#{}]({}) {}".format(pull.title, pull.number, url, author))
3233
print()
3334

3435

@@ -161,4 +162,4 @@ def cli(args=None):
161162
generate_changelog(repo, project, args.tag1, args.tag2, args.version)
162163

163164
if __name__ == "__main__":
164-
cli()
165+
cli()

0 commit comments

Comments
 (0)