From 614af661be5c29588e054f665b5341fe93494e0a Mon Sep 17 00:00:00 2001 From: Langenfeld Date: Fri, 12 Nov 2021 17:13:19 +0100 Subject: [PATCH] added generation of commit user objects --- gitea/gitea.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gitea/gitea.py b/gitea/gitea.py index ee91aa6..6226893 100644 --- a/gitea/gitea.py +++ b/gitea/gitea.py @@ -543,8 +543,8 @@ class Commit(GiteaApiObject): super(Commit, self).__init__(gitea) fields_to_parsers = { - # NOTE: do not try to parse gitea-users from git-committers/authors, as - # they are not necessarily users of gitea as well + # NOTE: api may return None for commiters that are no gitea users + {"author": lambda gitea, u: User.parse_response(gitea, u) if u else None} } def __eq__(self, other): diff --git a/setup.py b/setup.py index 47cd823..5cdecd0 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open('README.md') as readme_file: setup_args = dict( name='py-gitea', - version='0.1.6', + version='0.1.7', description='A python wrapper for the Gitea API', long_description_content_type="text/markdown", long_description=README,