github
github copied to clipboard
list the branches of my repository
The documentation is a bit confusing, how do I list the branches of my repository?
I tried the way below and could not:

ps: my repository, is private
I tried without putting (apiBase), but it did not work either
Hi @GlauberF,
I just made this a few moments ago, I hope that help you. PS: Using version 3.0.0
`
const github = new Github({ token : 'yourtoken' });
const me = github.getUser();
const organization = await github.getOrganization('yourorganization');
const repositorie = await organization.getRepo('repo name');
const branches = await Promise.all(repos.map(repository => repository.listBranches()));
`