()
return None
Get the maximum number of commits that should be processed for a hook.
Get the maximum number of commits that should be processed for a hook.
Get the maximum number of commits that should be processed for a hook .
def get_max_commits_for_hook() -> Optional[int]:
    """
    Get the maximum number of commits that should be processed for a hook.
    """
    try:
        max_commits = os.getenv("GITGUARDIAN_MAX_COMMITS_FOR_HOOK", None)
        if max_commits is not None:
            return int(max_commits)
    except BaseException as e:
        display_error(f"Unable to parse GITGUARDIAN_MAX_COMMITS_FOR_HOOK: {str(e)}")
        return None

    return None
def get_max_commits_for_hook ( ) -> Optional [ int ] : try : max_commits = os . getenv ( "GITGUARDIAN_MAX_COMMITS_FOR_HOOK" , None ) if max_commits is not None : return int ( max_commits ) except BaseException as e : display_error ( f"Unable to parse GITGUARDIAN_MAX_COMMITS_FOR_HOOK: {str(e)}" ) return None return None