v2.0.0
A big update that changes the notification object to a custom object.
Changelog:
- A custom object (detailed below) is now returned by the
getNotificationspromise instead of the annotated API response. - The notification object now has a unique ID based on a hash of the notification ID and the last updated timestamp.
- The notification object now includes data on the most recent comment (URL and avatar).
- Removes the
getReadNotificationsfunction;getNotificationsreturns read and unread notifications by default now. Sorting them can be done using theunreadproperty. - The raw API responses are now recorded in the
apiproperty if they are needed. - A missing token will now return an
Errorobject with thecodeproperty set toGitHubTokenNotFoundinstead of a string.
The new notification object has these properties:
updatedAt: The time (in ISO 8601 format) of the notification.unread: True if the notification has not been seen.repositoryName: The Repository name (eg:gitnews).repositoryFullName: The full Repository name (eg:sirbrillig/gitnews).title: The title of the notification.type: The type of the notification.id: A unique ID for this notification (at its most recently updated timestamp).private: True if the notification repo is private.commentUrl: The URL of the notification's most recent comment.subjectUrl: The URL of the notification's issue or PR.commentAvatar: The URL of the image for the notification's most recent commenter.repositoryOwnerAvatar: The URL of the image for the Repository's owner.api: The raw GitHub API responses.