@@ -394,12 +394,45 @@ pub mod github {
394
394
pub number : u32 ,
395
395
pub comments_url : String ,
396
396
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 ,
397
403
}
398
404
399
405
#[ 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 ,
403
436
}
404
437
405
438
#[ derive( Debug , Clone , Serialize , Deserialize ) ]
0 commit comments