-
Notifications
You must be signed in to change notification settings - Fork 280
refactor: use GitifyNotification type with transformation layer #2484
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
Conversation
Introduce a clean separation between raw GitHub API types and internal Gitify notification types: - Add transform.ts at API boundary to convert raw GitHub responses - Define GitifyNotification, GitifySubject, GitifyRepository, GitifyOwner types with camelCase properties - Update all components, handlers, filters, and utilities to use new types - Update GraphQL schema aliases for consistent property naming - Remove Notification type alias from typesGitHub.ts Closes #828
|
Close #828 |
|
After we land this PR, I'd love to start pulling out some of the formatting / logic within the UI components and pushing them into this api/transformation layer. eg: things like formatting notification titles, and so forth... |
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
|
setchy
left a comment
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.
Awesome, @afonsojramos - nice work! 👏
* refactor: use GitifyNotification type with transformation layer Introduce a clean separation between raw GitHub API types and internal Gitify notification types: - Add transform.ts at API boundary to convert raw GitHub responses - Define GitifyNotification, GitifySubject, GitifyRepository, GitifyOwner types with camelCase properties - Update all components, handlers, filters, and utilities to use new types - Update GraphQL schema aliases for consistent property naming - Remove Notification type alias from typesGitHub.ts Closes #828 * further type refactoring Signed-off-by: Adam Setch <adam.setch@outlook.com> * further type refactoring Signed-off-by: Adam Setch <adam.setch@outlook.com> * further type refactoring Signed-off-by: Adam Setch <adam.setch@outlook.com> * further type refactoring Signed-off-by: Adam Setch <adam.setch@outlook.com> --------- Signed-off-by: Adam Setch <adam.setch@outlook.com> Co-authored-by: Adam Setch <adam.setch@outlook.com>



Summary
Refactors the notification type system to use a unified
GitifyNotificationtype throughout the application, introducing a transformation layer at the API boundary to convert raw GitHub responses to the internal type format.Closes #828
Changes
transform.ts) to convert raw GitHub API responses toGitifyNotificationformatTesting