New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark notification as read #932
Conversation
Thanks for your PR. Very useful addition! Would you mind adding some unit tests for the new methods? |
Also some conflicts need to be resolved 😝 |
doc/examples/Repository.rst
Outdated
.. code-block:: python | ||
|
||
>>> repo = g.get_repo("PyGithub/PyGithub") | ||
>>> repo.mark_notification_has_read() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> repo.mark_notification_has_read() | |
>>> repo.mark_notification_as_read() |
2f4fb82
to
7ff4ddc
Compare
@sfdye I think I took into account all your feedbacks now. Please let me know if I forgot something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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 : PyGithub#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.
Wraps the parts of the notification API that allows the user to mark notifications as read.
New methods are :
Aims to fix : #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.