3 Commits

Author SHA1 Message Date
ethernet
e78e3a77be refactor(release): move the author map out of release.py
release.py was 2,804 lines, 2,076 of them the frozen legacy author dict.
The map and its resolver now live in scripts/releases/: authors.py holds
the directory loader, the merged AUTHOR_MAP and resolve_author, and
authors_legacy.py holds only the frozen LEGACY_AUTHOR_MAP literal (same
1,895 entries, same order). release.py drops to 707 lines.

The contributor-check job and audit_pr_attribution.py grep the legacy
file for quoted emails, so both now read authors_legacy.py. The
importers (contributor_audit.py, add_contributor.py), contributors/README
and the tests read the defining modules. No behaviour change.
2026-09-24 14:08:22 -04:00
ethernet
6e294f543d fix: read source files with encoding=utf-8-sig
Read text files with the encoding utf-8-sig so a BOM at the start of a
file does not cause a Unicode decode error (Windows editors add BOMs).

Reconstructed from ethie/pm commits 48a32b135b + 013219e814 onto the
current upstream/main base: only the utf-8 -> utf-8-sig transforms were
carried (370 exact line pairs across 205 files); pm-rename hunks that
rode in the original commit were left to the pm-store commit, and
utf8sig hunks entangled with content changes ride their owning commit.

Rebuilt on ethie/pm-clean off ac6c8028e0 (upstream/main).
2026-08-29 21:23:00 -04:00
Teknium
1c39f1c9f9 feat(ci): auto-fixable contributor attribution — audit_pr_attribution.py + gate points at it
The check-attribution CI gate kept bouncing salvage PRs because mapping
contributor emails was a manual, easy-to-forget step (bare
<login>@users.noreply.github.com emails don't auto-resolve like the
<id>+<login> form).

- scripts/audit_pr_attribution.py: mirrors the CI gate's logic exactly
  (merge-base scan, same skip rules). Report mode for pre-push checks;
  --fix auto-resolves via the bare-noreply local part (verified against
  the GitHub users API) or GitHub email search, then writes
  contributors/emails/<email> files via add_contributor.py. Prints a
  confirm-the-human warning on bare-noreply resolution since the local
  part is user-controlled (the bryan->hydraxman case).
- contributor-check.yml: failure output + review_status how_to_fix now
  lead with the one-command fix instead of hand-editing instructions
  (also drops the stale 'edit AUTHOR_MAP' guidance — AUTHOR_MAP is
  frozen).
2026-08-02 15:26:59 -07:00