1414
1515use serde:: { Deserialize , Serialize } ;
1616
17- use super :: { PartialCommit , PartialRepository , PartialUser } ;
17+ use crate :: types:: { Repository , User } ;
18+
19+ use super :: PartialCommit ;
1820
1921/// GitHub webhook event payload.
2022#[ derive( Debug , Serialize , Deserialize ) ]
2123pub struct Event {
2224 /// Secret token for verifying the webhook origin.
23- pub secret : String ,
25+ pub secret : Option < String > ,
2426
2527 /// The full Git ref that was pushed.
2628 #[ serde( rename = "ref" ) ]
@@ -38,12 +40,18 @@ pub struct Event {
3840 /// List of commits included in the push.
3941 pub commits : Vec < PartialCommit > ,
4042
43+ /// Total number of commits in the push event.
44+ pub total_commits : u64 ,
45+
46+ /// The most recent commit in the push event.
47+ pub head_commit : PartialCommit ,
48+
4149 /// Repository where the event occurred.
42- pub repository : PartialRepository ,
50+ pub repository : Repository ,
4351
4452 /// User who performed the push.
45- pub pusher : PartialUser ,
53+ pub pusher : User ,
4654
4755 /// User who triggered the event.
48- pub sender : PartialUser ,
56+ pub sender : User ,
4957}
0 commit comments