Esempio n. 1
0
 def get_commit_state(commit: str, check_for_merge_conflict: bool):
     if query_ci_status:
         ci_state: Optional[str] = get_ci_status(commit, target_branch)
         if ci_state:
             return EdgeStates.get_state(ci_state)
     if check_for_merge_conflict and has_merge_conflict(
             commit, target_branch, remote):
         return EdgeStates.blocked
     if commit in commits_inflight:
         return EdgeStates.working
     return EdgeStates.clear
Esempio n. 2
0
 def print_commit_status(commit: str,
                         check_for_merge_conflict: bool = False):
     hash = commit.split(' ')[0]
     status: str = ''
     if query_ci_status:
         ci_state: Optional[str] = get_ci_status(hash, target_branch)
         if ci_state:
             status = ci_state
     if not status:
         if hash in commits_inflight:
             status = 'Auto merge in progress'
         if check_for_merge_conflict and has_merge_conflict(
                 hash, target_branch, remote):
             status = 'Conflict'
     print(f'  * {commit}: {status}')