@@ -202,6 +202,7 @@ class CodeCommitData:
202202
203203 commit_author : Optional [str ] = None
204204 commit_message : Optional [str ] = None
205+ commit_diff : Optional [str ] = None
205206 commit_date : Optional [datetime .datetime ] = None
206207
207208 def __post_init__ (self ):
@@ -226,6 +227,7 @@ def _cmp_key(self):
226227 self .vcs_url ,
227228 self .commit_author ,
228229 self .commit_message ,
230+ self .commit_diff ,
229231 self .commit_date ,
230232 )
231233
@@ -236,6 +238,7 @@ def to_dict(self) -> dict:
236238 "vcs_url" : self .vcs_url ,
237239 "commit_author" : self .commit_author ,
238240 "commit_message" : self .commit_message ,
241+ "commit_diff" : self .commit_diff ,
239242 "commit_date" : self .commit_date ,
240243 }
241244
@@ -244,10 +247,11 @@ def from_dict(cls, data: dict):
244247 """Create a Commit instance from a dictionary."""
245248 commit_date = data .get ("commit_date" )
246249 return cls (
247- commit_hash = str ( data .get ("commit_hash" , "" ) ),
248- vcs_url = data .get ("vcs_url" , "" ),
250+ commit_hash = data .get ("commit_hash" ),
251+ vcs_url = data .get ("vcs_url" ),
249252 commit_author = data .get ("commit_author" ),
250253 commit_message = data .get ("commit_message" ),
254+ commit_diff = data .get ("commit_diff" ),
251255 commit_date = datetime .datetime .fromisoformat (commit_date ) if commit_date else None ,
252256 )
253257
0 commit comments