INNER CODE UNIT · Python

extract_co_authors

deltazefiro/Amarok-Hider · .github/scripts/summarize_translation_contrib.py:185

def extract_co_authors(commit_msg: str) -> List[Tuple[str, str]]:
    """Extract co-authors from commit message."""
    pattern = r"Co-authored-by:\s*(.+?)\s*<(.+?)>"
    matches = re.findall(pattern, commit_msg)
    return matches


def extract_language_from_line(line: str) -> Optional[str]:
    """Extract language from a commit message line."""
    pattern = r"translation(?:\s+update)?:\s+([^(]+?)\s*\(by"
    match = re.search(pattern, line)
    if match:
        return match.group(1).strip()
    return None


def parse_translation_commits(
    commit_list: List[str], verbose: bool = False

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…