I'd like to contribute a small enhancement to the GHRepository class and add a method to get the value of the allow_forking flag.
From the GitHub REST API Docs:
allow_forking boolean
Either true to allow private forks, or false to prevent private forks.
Default: false
Example context:
I need to fork repositories in a multistep workflow, but for private and internal repos forking can be disabled.
In these cases instead of getting an exception when trying to fork, I'd like to be able to check at the very beginning if it is possible at all and provide a proper message to the users.