()
return codeowner_map
Creates a mapping of integrations to codeowners entries
Creates a mapping of integrations to codeowners entries
Creates a mapping of integrations to codeowners entries
def create_codeowners_map():
    """Creates a mapping of integrations to codeowners entries"""
    codeowners = get_codeowners()
    all_integrations = sorted(get_valid_integrations())
    codeowner_map = dict.fromkeys(all_integrations)

    # each valid entry looks something like:
    # /containerd/                              @DataDog/container-integrations @DataDog/agent-integrations
    for entry in codeowners:
        parts = [part for part in entry.split(" ") if part != "" and part != "\t"]
        match = DIRECTORY_REGEX.match(parts[0])
        if match and match.group(1):
            if len(parts) < 2:
                codeowner_map[match.group(1)] = "empty"
            else:
                codeowner_map[match.group(1)] = parts[1]

    return codeowner_map
def create_codeowners_map ( ) : codeowners = get_codeowners ( ) all_integrations = sorted ( get_valid_integrations ( ) ) codeowner_map = dict . fromkeys ( all_integrations ) # each valid entry looks something like: # /containerd/                              @DataDog/container-integrations @DataDog/agent-integrations for entry in codeowners : parts = [ part for part in entry . split ( " " ) if part != "" and part != "\t" ] match = DIRECTORY_REGEX . match ( parts [ 0 ] ) if match and match . group ( 1 ) : if len ( parts ) < 2 : codeowner_map [ match . group ( 1 ) ] = "empty" else : codeowner_map [ match . group ( 1 ) ] = parts [ 1 ] return codeowner_map