@@ -394,12 +394,45 @@ pub mod github {
394394 pub number : u32 ,
395395 pub comments_url : String ,
396396 pub repository_url : String ,
397+ pub labels : Vec < Label > ,
398+ }
399+
400+ #[ derive( Debug , Clone , Serialize , Deserialize , PartialEq , Eq ) ]
401+ pub struct Label {
402+ pub name : String ,
397403 }
398404
399405 #[ derive( Debug , Clone , Serialize , Deserialize ) ]
400- pub struct Request {
401- pub issue : Issue ,
402- pub comment : Comment ,
406+ #[ serde( untagged) ]
407+ pub enum Request {
408+ Issue { issue : Issue , comment : Comment } ,
409+ Push ( Push ) ,
410+ }
411+
412+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
413+ pub struct Push {
414+ pub r#ref : String ,
415+ pub sender : Sender ,
416+ pub head_commit : HeadCommit ,
417+ pub before : String ,
418+ pub commits : Vec < Commit > ,
419+ }
420+
421+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
422+ pub struct Commit {
423+ #[ serde( rename = "id" ) ]
424+ pub sha : String ,
425+ pub message : String ,
426+ }
427+
428+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
429+ pub struct HeadCommit {
430+ pub message : String ,
431+ }
432+
433+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
434+ pub struct Sender {
435+ pub login : String ,
403436 }
404437
405438 #[ derive( Debug , Clone , Serialize , Deserialize ) ]
0 commit comments