Skip to content

v2.0.0

Compare
Choose a tag to compare
@sirbrillig sirbrillig released this 27 May 18:18
· 45 commits to master since this release

A big update that changes the notification object to a custom object.

Changelog:

  • A custom object (detailed below) is now returned by the getNotifications promise 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 getReadNotifications function; getNotifications returns read and unread notifications by default now. Sorting them can be done using the unread property.
  • The raw API responses are now recorded in the api property if they are needed.
  • A missing token will now return an Error object with the code property set to GitHubTokenNotFound instead 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.