kopia lustrzana https://github.com/Langenfeld/py-gitea
merged back in
commit
448a1b58dc
|
@ -34,8 +34,6 @@ class Organization:
|
||||||
gitea: Gitea-instance.
|
gitea: Gitea-instance.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# ORG_CREATE = """/admin/users/%s/orgs""" # <org>
|
|
||||||
# ORG_CREATE = """/orgs""" # <org>
|
|
||||||
ORG_REQUEST = """/orgs/%s""" # <org>
|
ORG_REQUEST = """/orgs/%s""" # <org>
|
||||||
ORG_REPOS_REQUEST = """/orgs/%s/repos""" # <org>
|
ORG_REPOS_REQUEST = """/orgs/%s/repos""" # <org>
|
||||||
ORG_TEAMS_REQUEST = """/orgs/%s/teams""" # <org>
|
ORG_TEAMS_REQUEST = """/orgs/%s/teams""" # <org>
|
||||||
|
@ -267,12 +265,12 @@ class User:
|
||||||
# Might not be deleteable otherwise.
|
# Might not be deleteable otherwise.
|
||||||
self.gitea.requests_delete(User.ADMIN_DELETE_USER % self.username)
|
self.gitea.requests_delete(User.ADMIN_DELETE_USER % self.username)
|
||||||
|
|
||||||
|
|
||||||
def get_heatmap(self):
|
def get_heatmap(self):
|
||||||
results = self.gitea.requests_get(User.USER_HEATMAP % self.username)
|
results = self.gitea.requests_get(User.USER_HEATMAP % self.username)
|
||||||
results = [(datetime.fromtimestamp(result["timestamp"]), result["contributions"]) for result in results]
|
results = [(datetime.fromtimestamp(result["timestamp"]), result["contributions"]) for result in results]
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
class Repository:
|
class Repository:
|
||||||
""" Represents a Repository in the Gitea-instance.
|
""" Represents a Repository in the Gitea-instance.
|
||||||
|
|
||||||
|
@ -462,6 +460,11 @@ class Issue:
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "#%i %s" % (self.id, self.title)
|
return "#%i %s" % (self.id, self.title)
|
||||||
|
|
||||||
|
def get_estimate_sum(self):
|
||||||
|
"""Returns the summed estimate-labeled values"""
|
||||||
|
return sum(map(lambda l: float(l["name"][10:]), filter(lambda l: l["name"][:10] == 'estimate: ' , self.labels)))
|
||||||
|
|
||||||
|
|
||||||
class Branch:
|
class Branch:
|
||||||
""" Represents a Branch in the Gitea-instance.
|
""" Represents a Branch in the Gitea-instance.
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue