@@ -26,6 +26,7 @@ use serde::{
26
26
de:: { self , Deserializer } ,
27
27
Deserialize ,
28
28
} ;
29
+ use derive_more:: From ;
29
30
30
31
use std:: fmt;
31
32
use std:: str:: FromStr ;
@@ -344,7 +345,7 @@ impl fmt::Display for EventType {
344
345
///
345
346
/// For documentation on each of these events, see:
346
347
/// https://developer.github.com/v3/activity/events/types/
347
- #[ derive( Deserialize , Debug , Clone , Eq , PartialEq , Ord , PartialOrd , Hash ) ]
348
+ #[ derive( Deserialize , From , Debug , Clone , Eq , PartialEq , Ord , PartialOrd , Hash ) ]
348
349
#[ allow( clippy:: large_enum_variant) ]
349
350
pub enum Event {
350
351
Ping ( PingEvent ) ,
@@ -361,8 +362,8 @@ pub enum Event {
361
362
Gollum ( GollumEvent ) ,
362
363
Installation ( InstallationEvent ) ,
363
364
InstallationRepositories ( InstallationRepositoriesEvent ) ,
364
- IntegrationInstallation ( InstallationEvent ) ,
365
- IntegrationInstallationRepositories ( InstallationRepositoriesEvent ) ,
365
+ IntegrationInstallation ( IntegrationInstallationEvent ) ,
366
+ IntegrationInstallationRepositories ( IntegrationInstallationRepositoriesEvent ) ,
366
367
IssueComment ( IssueCommentEvent ) ,
367
368
Issues ( IssuesEvent ) ,
368
369
Label ( LabelEvent ) ,
@@ -702,6 +703,26 @@ impl AppEvent for InstallationRepositoriesEvent {
702
703
}
703
704
}
704
705
706
+ /// Event deprecated by GitHub. Use `InstallationEvent` instead.
707
+ #[ derive( Deserialize , Debug , Clone , Eq , PartialEq , Ord , PartialOrd , Hash ) ]
708
+ pub struct IntegrationInstallationEvent ;
709
+
710
+ impl AppEvent for IntegrationInstallationEvent {
711
+ fn installation ( & self ) -> Option < u64 > {
712
+ None
713
+ }
714
+ }
715
+
716
+ /// Event deprecated by GitHub. Use `InstallationRepositoriesEvent` instead.
717
+ #[ derive( Deserialize , Debug , Clone , Eq , PartialEq , Ord , PartialOrd , Hash ) ]
718
+ pub struct IntegrationInstallationRepositoriesEvent ;
719
+
720
+ impl AppEvent for IntegrationInstallationRepositoriesEvent {
721
+ fn installation ( & self ) -> Option < u64 > {
722
+ None
723
+ }
724
+ }
725
+
705
726
#[ derive(
706
727
Deserialize , Debug , Copy , Clone , Eq , PartialEq , Ord , PartialOrd , Hash ,
707
728
) ]
0 commit comments