Skip to content

Commit 7a45b75

Browse files
committed
Support local commits in changelog.py
1 parent 0dbcbc6 commit 7a45b75

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

changelog.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@
5353
if description.startswith('Release '):
5454
lines.append(f' {now.year}-{now.month}-{now.day} {description}')
5555
continue
56-
commit = repo.get_commit(sha)
57-
pulls = [*commit.get_pulls()]
56+
try:
57+
commit = repo.get_commit(sha)
58+
pulls = [*commit.get_pulls()]
59+
except: # commit not found
60+
lines.append(f' {sha} {description} by {author}')
61+
continue
5862
numbers = []
5963
users = []
6064
for pull in pulls:

0 commit comments

Comments
 (0)