List matching references (#1471)

This commit is contained in:
Florent Clarret
2020-04-26 10:03:36 +08:00
committed by GitHub
parent 38b34db56e
commit d3bc6a5cd2
3 changed files with 56 additions and 0 deletions
+13
View File
@@ -2305,6 +2305,19 @@ class Repository(github.GithubObject.CompletableGithubObject):
github.GitRef.GitRef, self._requester, self.url + "/git/refs", None
)
def get_git_matching_refs(self, ref):
"""
:calls: `GET /repos/:owner/:repo/git/matching-refs/:ref <https://developer.github.com/v3/git/refs/#list-matching-references>`
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GitRef.GitRef`
"""
assert isinstance(ref, str), ref
return github.PaginatedList.PaginatedList(
github.GitRef.GitRef,
self._requester,
self.url + "/git/matching-refs/" + ref,
None,
)
def get_git_tag(self, sha):
"""
:calls: `GET /repos/:owner/:repo/git/tags/:sha <http://developer.github.com/v3/git/tags>`_