Email Affiliation email-affiliation
Resolves a contributor email address and optional date to JSON containing its affiliated domain and friendly organization name (or 'Individual' / 'Undisclosed') using Chromium's affiliations.json5 and org-list.txt files.
Use it when determining which company or organization a Chromium contributor, commit author, or reviewer is or was affiliated with.
- Our test
- —
- not tested yet
- GitHub stars
- 26k
- chromium/chromium
- Added by
- 0
- members
- Updated
- Dec 6
- commit 8cf236c
- Content
- 4 files
- 2 scripts · 16 KB
- License
- BSD 3-Clause
- free to use
What our test found
Not tested yet. Our model tries every skill on a realistic request and scores the result, the most popular skills first. Until then, the safety checks on the right still apply.
name: email-affiliation description: >- Resolves a contributor email address and optional date to JSON containing its affiliated domain and friendly organization name (or 'Individual' / 'Undisclosed') using Chromium's affiliations.json5 and org-list.txt files. Use when determining which company or organization a Chromium contributor, commit author, or reviewer is or was affiliated with.
Contributor Email Affiliation Lookup
Resolves an email address (currently or on a given YYYY-MM-DD date) to a JSON object {"domain": <str|null>, "organization": <str|null>} using and .
Usage
Run from the Chromium src directory:
# Current affiliation (defaults to today's local date):
vpython3 agents/skills/email-affiliation/scripts/email_affiliation.py \
user@chromium.org
# Affiliation on a specific date (e.g., a commit's %as author date):
vpython3 agents/skills/email-affiliation/scripts/email_affiliation.py \
schenney@chromium.org 2020-06-01Prints single-line JSON to stdout, for example:
{"domain": "microsoft.com", "organization": "Microsoft"}{"domain": "gmail.com", "organization": "Individual"}{"domain": null, "organization": "Undisclosed"}{"domain": "citrolabs.ai", "organization": null}(domain not mapped to a known organization inorg-list.txt)
Exits non-zero on invalid email or date arguments.
Resolution Rules
- Look up
<email>(case-insensitive) inthird_party/blink/tools/commit_stats/affiliations.json5. If listed, scanaffiliations(ordered most recentstartfirst) for the first entry withstart <= date: - If its
domainisIndividualorUndisclosed, returndomain: nulland that value asorganization. - Otherwise use that lowercase
domainfor step 3. - If
dateprecedes every listedstartdate for that account, return{"domain": null, "organization": "Undisclosed"}. - If unlisted in
affiliations.json5, resolvedomaintogoogle.comfor@chromium.orgaddresses and the email's lowercase domain otherwise. - Look up
domaininthird_party/blink/tools/commit_stats/org-list.txt: mapUnknownor unmapped domains tonull, and return all other friendly organization names verbatim.
Caveats
- Do not consult [`AUTHORS`](/AUTHORS) to infer affiliation: people listed in the
individualssection ofAUTHORSmay still be contributing on behalf of their organization (for example, when a corporate CLA authorizes specific employees rather than a*@domainwildcard). - Best-effort accuracy: because this data is derived primarily from self-attested and public information, results may not be 100% accurate.
Testing
vpython3 agents/skills/email-affiliation/scripts/email_affiliation_unittest.py