mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-22 22:06:43 +00:00
Check commits array is not empty
This commit is contained in:
parent
88e172a194
commit
4b6c80501f
4
main.py
4
main.py
@ -67,8 +67,8 @@ class GitHubClient(object):
|
||||
|
||||
def get_last_diff(self):
|
||||
"""Get the last diff."""
|
||||
if self.before != '0000000000000000000000000000000000000000':
|
||||
# There is a valid before SHA to compare with
|
||||
if self.before != '0000000000000000000000000000000000000000' or len(self.commits) == 0:
|
||||
# There is a valid before SHA to compare with, or this is a release being created
|
||||
diff_url = f'{self.repos_url}{self.repo}/compare/{self.before}...{self.sha}'
|
||||
elif len(self.commits) == 1:
|
||||
# There is only one commit
|
||||
|
||||
Loading…
Reference in New Issue
Block a user