MCPcopy Create free account
hub / github.com/OpenOSINT/OpenOSINT / _discover_emails

Function _discover_emails

openosint/tools/search_github.py:65–87  ·  view source on GitHub ↗
(
    session: aiohttp.ClientSession,
    login: str,
    repos: list[dict],
)

Source from the content-addressed store, hash-verified

63
64
65async def _discover_emails(
66 session: aiohttp.ClientSession,
67 login: str,
68 repos: list[dict],
69) -> set[str]:
70 emails: set[str] = set()
71 for repo in repos[:_COMMIT_REPOS_SAMPLE]:
72 try:
73 commits = await _get(
74 session,
75 f"{_API_BASE}/repos/{login}/{repo['name']}/commits",
76 params={"author": login, "per_page": _COMMITS_PER_REPO},
77 )
78 if not isinstance(commits, list):
79 continue
80 for commit in commits:
81 author = commit.get("commit", {}).get("author", {})
82 email = author.get("email", "")
83 if email and not email.endswith("noreply.github.com"):
84 emails.add(email)
85 except Exception:
86 pass
87 return emails
88
89
90async def _search_users(session: aiohttp.ClientSession, query: str) -> list[dict]:

Callers 1

run_github_osintFunction · 0.85

Calls 1

_getFunction · 0.85

Tested by

no test coverage detected