Invitations contain information about the user they are for, and
which user invited them, so export that too.
During invesigating attmepting to test the new attributes of Invitation,
it was discovered that there are no code paths to fetch them, so add
AuthenticatedUser.get_invitations(). The test added can do double duty.
Wraps the parts of the notification API that allows the user to mark notifications as read.
New methods are :
- Notification.mark_as_read : marks a single notification thread as read
- Repository.mark_notifications_as_read : marks all the notifications for a given repository as read
- AuthenticatedUser.mark_notifications_as_read : marks all the notifications as read
Aims to fix : https://github.com/PyGithub/PyGithub/issues/571 and simply uses the APIs described on this page : https://developer.github.com/enterprise/11.10.340/v3/activity/notifications/
A weird thing I noticed doing this is that Repository.notifications_url doesn't seem to be usable directly. I used Repository.url + "/notifications" instead.
The Github gists api has a since parameter for the various gist searches. This adds that parameter to Github.get_gists(), NamedUser.get_gists() and Authenticator.get_gists(). Tests and replay data added/updated as needed.
I added a Time module in the tests directory, containing just a UTCtzinfo class, which I felt I needed for one of the tests (and would probably be useful in other since/until tests). Might not be the best name for the module but it seemed the least invasive thing to do.
* 'watching' != 'staring'
The functionality was completely broken - api endpoints were wrong/didn't work. Tested by logging in as an authenticated user - verified listing watches, add watch, and remove watch.
* fix unit tests
* Added missing parameters to organisation repo creation
* team_id should already be an id not a team object
* Name arguments in the test
* Fixed assertion check
* Added missing parameters to user repo creation
* Fixed comments
github.AuthenticatedUser.create_authorization has been modified to
support two-factor authentication. When two-factor authentication
is enabled create_authorization will throw an TwoFactorException.
The onetime password can be then be passed to create_authorization
on a subsequent call.