Nov-03-2020, 08:53 AM
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