I have no problems with accessing the repositories and I am even able to print some of the statuses. The following statuses I can print are
Allow forking: True
Allow merge commits: True
Allow squash merging: True
Allow rebase merging: False
When I try to print the status of Allow auto-merge, I get the following error
AttributeError: 'Repository' object has no attribute 'allow_auto_merge'. Did you mean: 'allow_squash_merge'?
I know there is an attribute of allow_auto_merge because I found this in the documentation for PyGitHub: https://pygithub.readthedocs.io/en/latest/github_objects/Repository.html
Here is the code I used for showing whether something is enabled or disabled
# Function to print repository settings
def print_repo_settings(repo):
print(f"Repository: {repo.name}")
print(f" Allow forking: {repo.allow_forking}")
print(f" Allow merge commits: {repo.allow_merge_commit}")
print(f" Allow squash merging: {repo.allow_squash_merge}")
print(f" Allow rebase merging: {repo.allow_rebase_merge}")
print(f" Allow auto-merge: {repo.allow_auto_merge}")
Maybe I am using an deprecated property. If thats the case what should I use to access it?