3636
3737def is_ci_bot (api : github .GitHub , pr : int ) -> bool :
3838 author = api .get_author (pr )
39+ print (author )
3940 login = get_str (author , 'login' )
4041 login_id = get_int (author , 'id' )
4142
@@ -45,16 +46,17 @@ def is_ci_bot(api: github.GitHub, pr: int) -> bool:
4546
4647def all_checks_pass (api : github .GitHub , commit_hash : str ) -> bool :
4748 statuses = api .statuses (commit_hash )
49+ print (f"STATUSES: { statuses } " )
4850
49- logger . info ("Checking statuses:" )
51+ print ("Checking statuses:" )
5052 if len (statuses ) == 0 :
51- logger . info ("No statuses found for commit %s" , commit_hash )
53+ print ("No statuses found for commit %s" , commit_hash )
5254 return False
5355
5456 for context in statuses :
5557 status = statuses [context ]
5658 status_state = get_str (status , 'state' )
57- logger . info ("Status for context '%s': %s" , context , status_state )
59+ print ("Status for context '%s': %s" , context , status_state )
5860 if status_state != 'success' :
5961 return False
6062
@@ -71,9 +73,10 @@ def auto_merge_bots_pr(repo: str, pr: int, sha: str) -> None:
7173 # return
7274
7375 # check that all checks are green
74- print (f"all_checks_pass: { all_checks_pass (api , sha )} " )
75- if not all_checks_pass (api , sha ):
76- logger .info ("Not every check has passed, skipping automerge" )
76+ all_pass = all_checks_pass (api , sha )
77+ print (f"all_checks_pass: { all_pass } " )
78+ if not all_pass :
79+ print ("Not every check has passed, skipping automerge" )
7780 return
7881
7982 logger .info ("All checks green, can automerge" )
0 commit comments