mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-13 15:49:53 +00:00
fix(pr-to-video): use display names, not GitHub logins, in credits narration (#2385)
* fix(pr-to-video): use display names, not GitHub logins, in credits narration gh pr view already returns a `name` field for the PR author, commit authors, and mergedBy. ingest.mjs now tracks it in people.json alongside login; fetch-people-avatars.mjs resolves a name for reviewers/commenters/assignees gh doesn't name via the public GitHub user API, best-effort. story-design.md now directs the credits close to speak the person's name (TTS reading a raw handle like @miguAng18947550 aloud is the failure mode), with the handle shown as secondary on-screen text only. * fix(pr-to-video): resolve missing credit names via the agent, not a new script fetch fetch-people-avatars.mjs already runs inside the orchestrating agent's turn, which has gh available — no need for the script to duplicate a name lookup the agent can do itself with `gh api users/<login> --jq .name`. Reverts the script back to avatar-fetching only; SKILL.md/story-design.md now tell the agent to resolve any missing name for the credited people itself before writing the credits close. * fix(pr-to-video): regenerate skills-manifest.json hash Stale hash left over from a rebase conflict I resolved by hand — the generator produces the correct one.
This commit is contained in:
@@ -98,7 +98,8 @@ PR="<url | owner/repo#N | N>"
|
||||
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/fetch-pr.mjs --pr "$PR" --out-dir ./capture)
|
||||
|
||||
# Offline transform → capture/extracted/{tokens.json (colors:[] → claude palette),
|
||||
# visible-text.txt (the brief), people.json (contributors, bot-filtered, avatarFile=assets/<login>.png)}.
|
||||
# visible-text.txt (the brief), people.json (contributors, bot-filtered, name+login,
|
||||
# avatarFile=assets/<login>.png)}.
|
||||
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/ingest.mjs \
|
||||
--pr-json ./capture/pr.json --diff ./capture/diff.patch --out-dir ./capture/extracted)
|
||||
|
||||
@@ -110,6 +111,8 @@ PR="<url | owner/repo#N | N>"
|
||||
|
||||
If `fetch-pr.mjs` exits 1 (gh auth / not found / private), report its stderr and stop — **do not fabricate PR contents**. If `ingest.mjs` exits 1, read its stderr (usually a malformed `pr.json`), fix, and rerun (deterministic). `fetch-people-avatars.mjs` always exits 0; missing avatars just mean no credits close to author.
|
||||
|
||||
`people.json` carries a `name` for whichever contributors `gh` already named (the PR author, commit authors, `mergedBy`) — `null` for the rest (reviewers/commenters/assignees, which `gh pr view` only ever gives a bare `login`). Before writing the credits close in Step 3, resolve any `null` name yourself for the 1-6 people who'll actually appear on that frame: `gh api users/<login> --jq .name` (you already have `gh` — no need to script this). If GitHub has no public name for that user either, fall back to the login on-screen and drop that person from the spoken line (see story-design.md's credits section — the voiceover must still say names, never raw handles).
|
||||
|
||||
**Gate:** `capture/pr.json`, `capture/diff.patch`, `capture/extracted/tokens.json`, `capture/extracted/visible-text.txt`, and `capture/extracted/people.json` exist; you can state the PR's change in one clear sentence. `assets/<login>.png` is best-effort — its absence is not a failure.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user