kopia lustrzana https://github.com/Langenfeld/py-gitea
fixed trying to parse more gitea payloadcommit objects where there are non (e.g. listing commits)
data is assigned to a inner_commit dictionary as commit is already taken by apiobject commit function and fixing that would cause too many things to breakpull/11/head
rodzic
e029605ded
commit
05d906148a
|
@ -240,7 +240,8 @@ class Branch(GiteaApiObject):
|
|||
return hash(self.commit) ^ hash(self.name)
|
||||
|
||||
fields_to_parsers = {
|
||||
"commit": lambda gitea, c: Commit.parse_response(gitea, c)
|
||||
# This is not a commit object
|
||||
#"commit": lambda gitea, c: Commit.parse_response(gitea, c)
|
||||
}
|
||||
|
||||
@classmethod
|
||||
|
@ -561,8 +562,10 @@ class Commit(GiteaApiObject):
|
|||
|
||||
@classmethod
|
||||
def parse_response(cls, gitea, result):
|
||||
commit_cache = result["commit"]
|
||||
api_object = cls(gitea)
|
||||
cls._initialize(gitea, api_object, result)
|
||||
BasicGiteaApiObject._add_readonly_property("inner_commit", commit_cache, api_object)
|
||||
return api_object
|
||||
|
||||
|
||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ with open('README.md') as readme_file:
|
|||
|
||||
setup_args = dict(
|
||||
name='py-gitea',
|
||||
version='0.1.7',
|
||||
version='0.1.8',
|
||||
description='A python wrapper for the Gitea API',
|
||||
long_description_content_type="text/markdown",
|
||||
long_description=README,
|
||||
|
|
Ładowanie…
Reference in New Issue