Python Forum

Full Version: How to check whether a file exist in all github branch using github3.py
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to get all the branches in which a file name called listofusers.py is available

import os
import github3
def get_all_branches_from_github():
 gh = github3.enterprise_login(
            url='xxxxxxxxxxxxx',
            token=os.environ["GITHUB_TOKEN"],
         )
    org = gh.organization("ABCDE") // Branches under the "ABCDE"
        for repo in org.repositories():
            name = repo.name
	

if __name__ == "__main__":
    names = get_all_branches_from_github()
Thank you