I'm currently working on a project where I need to retrieve the permissions associated with a GitHub token programmatically using the PyGithub library in Python. I have been exploring the PyGithub documentation, but I couldn't find a direct method for achieving this.
Could someone please provide guidance on how to use the PyGithub library to fetch the permissions granted to a GitHub token? Specifically, I need to access the permissions granted to the token, such as read, write, delete, etc., for various GitHub resources like repositories, organizations, or user data.
Any code examples or pointers to relevant documentation would be greatly appreciated.
Thank you in advance for your assistance!
I attempted to call various methods provided by the PyGithub library to retrieve token permissions. I expected these methods to provide information about the permissions associated with the token, such as read, write, or delete access for GitHub resources like repositories, organizations, or user data. However, none of the methods I tried yielded the desired result. Despite consulting the PyGithub documentation extensively, I couldn't find a direct solution to fetch token permissions programmatically.