INNER CODE UNIT · Python

lookup_github_user_by_email

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

async def lookup_github_user_by_email(
    session, semaphore, email: str, verbose: bool = False
) -> Tuple[str, Optional[str]]:
    """
    Look up GitHub username by email using GitHub API with async/await.
    Returns (email, username) tuple.
    """
    # Check cache first
    if email in _email_to_username_cache:
        return (email, _email_to_username_cache[email])

    # Skip obvious non-GitHub emails
    if email.endswith("@weblate.org") or "@" not in email:
        _email_to_username_cache[email] = None
        return (email, None)

    async with semaphore:
        try:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…