Slicing a PaginatedList from PyGithub can produce an IndexError if the list is empty (while slicing an empty Python list do not). A few fixes can be envisaged:
- Check if the list is not empty before slicing and iterating over it - Not pythonic
- Monkey patch the PaginatedList class to properly re-implement slicing
- Open an issue and propose a PR to PyGithub