mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Repository.get_branch
This commit is contained in:
@@ -526,6 +526,16 @@ class Repository( GithubObject.GithubObject ):
|
||||
data
|
||||
)
|
||||
|
||||
def get_branch( self, branch ):
|
||||
assert isinstance( branch, ( str, unicode ) ), branch
|
||||
headers, data = self._requester.requestAndCheck(
|
||||
"GET",
|
||||
self.url + "/branches/" + branch,
|
||||
None,
|
||||
None
|
||||
)
|
||||
return Branch.Branch( self._requester, data, completed = True )
|
||||
|
||||
def get_branches( self ):
|
||||
headers, data = self._requester.requestAndCheck(
|
||||
"GET",
|
||||
|
||||
Reference in New Issue
Block a user