27
27
NOTIFICATION_REPO = "EmbeddedLLM/aiter-api-watcher"
28
28
CHECK_INTERVAL = 3600 # Check every hour by default
29
29
30
+
30
31
def load_config ():
31
32
"""Load configuration from JSON file"""
32
33
if not os .path .exists (CONFIG_FILE ):
@@ -345,8 +346,10 @@ def compare_two_commits(config, old_commit, new_commit):
345
346
old_signature .get ("parameters" ),
346
347
new_signature .get ("parameters" )
347
348
)
348
-
349
- title = f"API Change Detected (Compare Mode): { func_config ['function_path' ]} "
349
+ commit_info = get_commit_info (temp_dir , new_commit )
350
+ commit_date = commit_info .get ("date" , "Unknown" ).split ()[0 ] # Only keep YYYY-MM-DD
351
+ short_commit = new_commit [:7 ]
352
+ title = f"[{ commit_date } { short_commit } ] API Change Detected (Compare Mode): { func_config ['function_path' ]} "
350
353
body = f"""## API Change Detected (Compare Mode)
351
354
352
355
Function: `{ func_config ['function_path' ]} `
@@ -392,6 +395,10 @@ def process_commit_list(config):
392
395
subprocess .run (["git" , "submodule" , "update" , "--init" , "--recursive" ], cwd = temp_dir , check = True )
393
396
subprocess .run ([sys .executable , "setup.py" , "develop" ], cwd = temp_dir , check = True )
394
397
398
+ commit_info = get_commit_info (temp_dir , commit )
399
+ commit_date = commit_info .get ("date" , "Unknown" ).split ()[0 ]
400
+ short_commit = commit [:7 ]
401
+
395
402
for func_config in config ["functions_to_monitor" ]:
396
403
import_statement = func_config ["import_statement" ]
397
404
function_path = func_config ["function_path" ]
@@ -413,7 +420,7 @@ def process_commit_list(config):
413
420
current_signature .get ("parameters" )
414
421
)
415
422
416
- title = f"API Change Detected: { function_path } "
423
+ title = f"[ { commit_date } { short_commit } ] API Change Detected: { function_path } "
417
424
body = f"""## API Change Detected
418
425
419
426
Function: `{ function_path } `
@@ -554,7 +561,9 @@ def check_api_changes(config):
554
561
)
555
562
556
563
# API has changed, create a GitHub issue
557
- title = f"API Change Detected: { function_path } "
564
+ commit_date = commit_info .get ("date" , "Unknown" ).split ()[0 ] # Only keep YYYY-MM-DD
565
+ short_commit = commit [:7 ]
566
+ title = f"[{ commit_date } { short_commit } ] API Change Detected: { function_path } "
558
567
559
568
body = f"""## API Change Detected
560
569
0 commit comments