Repository navigation
Conversation
gh resolves both the repository and the argument against the local git context, so \gh pr view owner/repo#N\ reads the whole thing as a branch name and fails outright outside a git repository - which is the directory the pr-to-video skill runs the fetch in. Parse the ref ourselves and pass the number with --repo when the ref names a repository. A bare number keeps the old behaviour.
jrusso1020
left a comment
There was a problem hiding this comment.
Reviewed at de725685f9f1952d232a4409c7dc9e691680abd1.
Explicit --repo and numeric pull request arguments fix owner/repo references outside a repository. Please rebase because the skill fetch script conflicts with current main.
Read parser and view/diff/API call construction; no GitHub writes. No full integration run is claimed.
Need: yes · Size: ok · Reuse: existing helper and dispatch paths · Simpler: keep the focused fix · Structure: fine
Risk: medium - compatibility with current main.
Verdict: COMMENT
Reasoning: The branch currently conflicts with main; I will review the resolved delta after a rebase.
Reasoning: Explicit --repo and numeric pull request arguments fix owner/repo references outside a repository. Please rebase because the skill fetch script conflicts with current main.
|
This PR has had no activity for 14 days, so it is marked stale and will close in 7 days. Push a commit or leave a comment to keep it open. A maintainer can add |
|
Closed after 21 days without activity. Reopen it, or open a new PR, whenever you pick it back up. |
|
Closing the loop on this one rather than rebasing it. The @jrusso1020 flagging this so the rebase request isn't left waiting on a branch that can't satisfy it. The underlying problem is still real in spirit — resolving an explicit Leaving this closed as obsolete unless that turns out to be the case. |
Closes #6027
The problem
skills/pr-to-video/scripts/fetch-pr.mjspassed the--prvalue straight togh pr view, and gh resolves both the repository and the argument againstthe local git context. Two things break:
directory the skill runs in is exactly that: step 0 runs
hyperframes initinto a fresh cache dir, and step 1 then runs this script with that
directory as cwd.
owner/repo#Nis read as a branch name, sogh pr view "DataLinkDC/dinky#4584"reports "no pull requests found forbranch" — the documented form of
--prnever worked, and only a barenumber did.
The fix
Parse the ref ourselves and pin the repository:
lib/pr-ref.mjs(new) exportsparsePrRef, which understands a full PRurl,
owner/repo#Nand a bare number.fetch-pr.mjsbuilds its gh arguments from that: the number on its own, plus--repo owner/repowhenever the ref names a repository. A bare number keepsthe old behaviour (gh resolves it from the git context).
Both gh calls are pinned, not just the first:
gh pr diffhad the sameproblem, and the follow-up
gh api repos/<owner>/<repo>/pulls/N/filescallwas already repo-qualified, so it now works in the same directory.
Test
skills/pr-to-video/scripts/fetch-pr.test.mjscovers the parser: a PR url,owner/repo#N, a bare number, and a value that names no pull request.How I verified it
The repo's test runner is
node --teston the*.test.mjsfiles, and node isavailable here, so I ran the new test:
And the end-to-end case from the issue, in a directory that is not a git
repository:
The script itself, run the same way:
Model Used
MiniMax M3.1 Flash Free via the opencode agent harness (
minimax-m3.1-flash-free)