INNER CODE UNIT · Python

get_commit_message

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

def get_commit_message(commit_hash: str) -> str:
    """Get the full commit message."""
    try:
        result = subprocess.run(
            ["git", "show", "--format=%B", "--no-patch", commit_hash],
            capture_output=True,
            text=True,
            check=True,
        )
        return result.stdout
    except subprocess.CalledProcessError:
        return ""


def extract_github_username_from_email(email: str) -> Optional[str]:
    """Extract GitHub username from email address."""
    # GitHub noreply format: 25982450+VisionR1@users.noreply.github.com
    pattern = r"(\d+\+)?([^@]+)@users\.noreply\.github\.com"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…