1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-11-28 15:29:52 +01:00

Handle situations when there's 'None' among timeline entries

This commit is contained in:
2025-08-15 10:41:53 +02:00
parent 607053dedd
commit ed5549722e
4 changed files with 20 additions and 2 deletions

View File

@@ -53,6 +53,9 @@ class PullRequestGetCommand(osc.commandline_git.GitObsCommand):
print(tty.colorize("Timeline:", "bold"))
timeline = gitea_api.IssueTimelineEntry.list(self.gitea_conn, owner, repo, pull)
for entry in timeline:
if entry._data is None:
print(f"{tty.colorize('ERROR', 'red,bold,blink')}: Gitea returned ``None`` instead of a timeline entry")
continue
text, body = entry.format()
if text is None:
continue