@@ -46,13 +46,18 @@ instance FromJSON Subject where
46
46
<*> o .: " type"
47
47
48
48
data NotificationReason
49
- = AssignReason
49
+ = ApprovalRequestedReason
50
+ | AssignReason
50
51
| AuthorReason
51
52
| CommentReason
53
+ | CiActivityReason
52
54
| InvitationReason
53
55
| ManualReason
56
+ | MemberFeatureRequestedReason
54
57
| MentionReason
55
58
| ReviewRequestedReason
59
+ | SecurityAlertReason
60
+ | SecurityAdvisoryCreditReason
56
61
| StateChangeReason
57
62
| SubscribedReason
58
63
| TeamMentionReason
@@ -63,17 +68,22 @@ instance Binary NotificationReason
63
68
64
69
instance FromJSON NotificationReason where
65
70
parseJSON = withText " NotificationReason" $ \ t -> case T. toLower t of
66
- " assign" -> pure AssignReason
67
- " author" -> pure AuthorReason
68
- " comment" -> pure CommentReason
69
- " invitation" -> pure InvitationReason
70
- " manual" -> pure ManualReason
71
- " mention" -> pure MentionReason
72
- " review_requested" -> pure ReviewRequestedReason
73
- " state_change" -> pure StateChangeReason
74
- " subscribed" -> pure SubscribedReason
75
- " team_mention" -> pure TeamMentionReason
76
- _ -> fail $ " Unknown NotificationReason " ++ show t
71
+ " approval_requested" -> pure ApprovalRequestedReason
72
+ " assign" -> pure AssignReason
73
+ " author" -> pure AuthorReason
74
+ " comment" -> pure CommentReason
75
+ " ci_activity" -> pure CiActivityReason
76
+ " invitation" -> pure InvitationReason
77
+ " manual" -> pure ManualReason
78
+ " member_feature_requested" -> pure MemberFeatureRequestedReason
79
+ " mention" -> pure MentionReason
80
+ " review_requested" -> pure ReviewRequestedReason
81
+ " security_alert" -> pure SecurityAlertReason
82
+ " security_advisory_credit" -> pure SecurityAdvisoryCreditReason
83
+ " state_change" -> pure StateChangeReason
84
+ " subscribed" -> pure SubscribedReason
85
+ " team_mention" -> pure TeamMentionReason
86
+ _ -> fail $ " Unknown NotificationReason " ++ show t
77
87
78
88
data Notification = Notification
79
89
-- XXX: The notification id field type IS in fact string. Not sure why gh
0 commit comments