@@ -4,6 +4,7 @@ module Github
44 class Client ::Repos < API
55 # Load all the modules after initializing Repos to avoid superclass mismatch
66 require_all 'github_api/client/repos' ,
7+ 'branches' ,
78 'collaborators' ,
89 'comments' ,
910 'commits' ,
@@ -87,6 +88,9 @@ class Client::Repos < API
8788 # Access to Repos::Statuses API
8889 namespace :statuses
8990
91+ # Access to Repos::Branches API
92+ namespace :branches
93+
9094 # List repositories for the authenticated user
9195 #
9296 # @example
@@ -356,14 +360,14 @@ def delete(*args)
356360 # repos.branches 'user-name', 'repo-name'
357361 #
358362 # @api public
359- def branches ( *args )
360- arguments ( args , required : [ :user , :repo ] )
363+ # def branches(*args)
364+ # arguments(args, required: [:user, :repo])
361365
362- response = get_request ( "/repos/#{ arguments . user } /#{ arguments . repo } /branches" , arguments . params )
363- return response unless block_given?
364- response . each { |el | yield el }
365- end
366- alias :list_branches :branches
366+ # response = get_request("/repos/#{arguments.user}/#{arguments.repo}/branches", arguments.params)
367+ # return response unless block_given?
368+ # response.each { |el| yield el }
369+ # end
370+ # alias :list_branches :branches
367371
368372 # Get branch
369373 #
@@ -373,11 +377,11 @@ def branches(*args)
373377 # github.repos.branch user: 'user-name', repo: 'repo-name', branch: 'branch-name'
374378 # github.repos(user: 'user-name', repo: 'repo-name', branch: 'branch-name').branch
375379 # @api public
376- def branch ( *args )
377- arguments ( args , required : [ :user , :repo , :branch ] )
380+ # def branch(*args)
381+ # arguments(args, required: [:user, :repo, :branch])
378382
379- get_request ( "/repos/#{ arguments . user } /#{ arguments . repo } /branches/#{ arguments . branch } " , arguments . params )
380- end
383+ # get_request("/repos/#{arguments.user}/#{arguments.repo}/branches/#{arguments.branch}", arguments.params)
384+ # end
381385
382386 # List contributors
383387 #
0 commit comments