Create repo from template (#2090)

Co-authored-by: bagashvilit <bagashvilit@allegheny.edu>
Co-authored-by: WonjoonC <chos@allegheny.edu>
Co-authored-by: Isac Souza <isouza@daitangroup.com>
Co-authored-by: Isac Souza <isouza@daitan.com>
Co-authored-by: Liuyang Wan <tsfdye@gmail.com>
This commit is contained in:
KimSia Sim
2022-10-13 09:13:31 +08:00
committed by GitHub
co-authored by bagashvilit WonjoonC Isac Souza Isac Souza Liuyang Wan
parent 7e6333da1a
commit b50283a7cf
11 changed files with 270 additions and 1 deletions
+22 -1
View File
@@ -473,6 +473,14 @@ class Repository(github.GithubObject.CompletableGithubObject):
self._completeIfNotSet(self._id)
return self._id.value
@property
def is_template(self):
"""
:type: bool
"""
self._completeIfNotSet(self._is_template)
return self._is_template.value
@property
def issue_comment_url(self):
"""
@@ -763,6 +771,14 @@ class Repository(github.GithubObject.CompletableGithubObject):
self._completeIfNotSet(self._teams_url)
return self._teams_url.value
@property
def topics(self):
"""
:type: list of strings
"""
self._completeIfNotSet(self._topics)
return self._topics.value
@property
def trees_url(self):
"""
@@ -995,7 +1011,6 @@ class Repository(github.GithubObject.CompletableGithubObject):
"""
Convenience function that calls :meth:`Repository.create_git_tag` and
:meth:`Repository.create_git_release`.
:param tag: string
:param tag_message: string
:param release_name: string
@@ -3729,6 +3744,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
self._hooks_url = github.GithubObject.NotSet
self._html_url = github.GithubObject.NotSet
self._id = github.GithubObject.NotSet
self._is_template = github.GithubObject.NotSet
self._issue_comment_url = github.GithubObject.NotSet
self._issue_events_url = github.GithubObject.NotSet
self._issues_url = github.GithubObject.NotSet
@@ -3765,6 +3781,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
self._svn_url = github.GithubObject.NotSet
self._tags_url = github.GithubObject.NotSet
self._teams_url = github.GithubObject.NotSet
self._topics = github.GithubObject.NotSet
self._trees_url = github.GithubObject.NotSet
self._updated_at = github.GithubObject.NotSet
self._url = github.GithubObject.NotSet
@@ -3871,6 +3888,8 @@ class Repository(github.GithubObject.CompletableGithubObject):
self._html_url = self._makeStringAttribute(attributes["html_url"])
if "id" in attributes: # pragma no branch
self._id = self._makeIntAttribute(attributes["id"])
if "is_template" in attributes: # pragma no branch
self._is_template = self._makeBoolAttribute(attributes["is_template"])
if "issue_comment_url" in attributes: # pragma no branch
self._issue_comment_url = self._makeStringAttribute(
attributes["issue_comment_url"]
@@ -3971,6 +3990,8 @@ class Repository(github.GithubObject.CompletableGithubObject):
self._teams_url = self._makeStringAttribute(attributes["teams_url"])
if "trees_url" in attributes: # pragma no branch
self._trees_url = self._makeStringAttribute(attributes["trees_url"])
if "topics" in attributes: # pragma no branch
self._topics = self._makeListOfStringsAttribute(attributes["topics"])
if "updated_at" in attributes: # pragma no branch
self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
if "url" in attributes: # pragma no branch