kopia lustrzana https://github.com/Langenfeld/py-gitea
pull/3/head
rodzic
e9d45515d9
commit
0acbdbe125
|
@ -10,4 +10,3 @@ from .gitea import (
|
|||
Issue,
|
||||
Milestone,
|
||||
)
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import logging
|
||||
from .exceptions import ObjectIsInvalid
|
||||
|
||||
class BasicGiteaApiObject:
|
||||
|
||||
class BasicGiteaApiObject:
|
||||
GET_API_OBJECT = "FORMAT/STINING/{argument}"
|
||||
PATCH_API_OBJECT = "FORMAT/STINING/{argument}"
|
||||
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
class AlreadyExistsException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class NotFoundException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class ObjectIsInvalid(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class ConflictException(Exception):
|
||||
pass
|
|
@ -299,6 +299,7 @@ class Comment(BasicGiteaApiObject):
|
|||
|
||||
patchable_fields = {"body"}
|
||||
|
||||
|
||||
class Commit(GiteaApiObject):
|
||||
|
||||
def __init__(self, gitea, id: int):
|
||||
|
@ -308,7 +309,6 @@ class Commit(GiteaApiObject):
|
|||
"author": lambda gitea, u: User.parse_response(gitea, u)
|
||||
}
|
||||
|
||||
|
||||
@classmethod
|
||||
def request(cls, gitea, owner, repo):
|
||||
api_object = cls._request(gitea, {"owner": owner, "repo": repo})
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
from .basicGiteaApiObject import BasicGiteaApiObject
|
||||
import logging
|
||||
|
||||
|
||||
class GiteaApiObject(BasicGiteaApiObject):
|
||||
|
||||
GET_API_OBJECT = "FORMAT/STINING/{argument}"
|
||||
PATCH_API_OBJECT = "FORMAT/STINING/{argument}"
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue