@@ -396,8 +396,8 @@ def branch(self, name):
396
396
json = None
397
397
if name :
398
398
url = self ._build_url ('branches' , name , base_url = self ._api )
399
- headers = { 'Accept' : 'application/vnd.github.loki-preview+json' }
400
- json = self . _json ( self . _get ( url , headers = headers ), 200 )
399
+ json = self . _json ( self . _get ( url , headers = Branch . PREVIEW_HEADERS ),
400
+ 200 )
401
401
return self ._instance_or_null (Branch , json )
402
402
403
403
def branches (self , number = - 1 , protected = False , etag = None ):
@@ -413,14 +413,9 @@ def branches(self, number=-1, protected=False, etag=None):
413
413
:class:`Branch <github3.repos.branch.Branch>`\ es
414
414
"""
415
415
url = self ._build_url ('branches' , base_url = self ._api )
416
-
417
- # The Accept header will likely be removable once the feature is out of
418
- # preview mode. See: http://git.io/v4O1e
419
- headers = {'Accept' : 'application/vnd.github.loki-preview+json' }
420
-
421
416
params = {'protected' : '1' } if protected else None
422
417
return self ._iter (int (number ), url , Branch , params , etag = etag ,
423
- headers = headers )
418
+ headers = Branch . PREVIEW_HEADERS )
424
419
425
420
def code_frequency (self , number = - 1 , etag = None ):
426
421
"""Iterate over the code frequency per week.
0 commit comments