Skip to content

[codex] fix gh-address-comments on fork PRs#500

Draft
chaochaoweb3 wants to merge 1 commit into
openai:mainfrom
chaochaoweb3:codex/fix-gh-comments-fork-pr
Draft

[codex] fix gh-address-comments on fork PRs#500
chaochaoweb3 wants to merge 1 commit into
openai:mainfrom
chaochaoweb3:codex/fix-gh-comments-fork-pr

Conversation

@chaochaoweb3

Copy link
Copy Markdown

Summary

  • resolve the current PR GraphQL target from the base repository URL instead of the head repository
  • add a small stdlib unittest for PR URL parsing and the current-PR resolver

Why

gh-address-comments fetches review threads by PR number. On fork PRs, that number belongs to the base repository, so querying the head fork can fail with Could not resolve to a PullRequest. Resolving from gh pr view --json url keeps same-repo PRs working and points fork PRs at the base repo.

Fixes #495.

Validation

  • python3 -m py_compile fetch_comments.py test_fetch_comments.py
  • python3 -m unittest test_fetch_comments.py
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gh-address-comments fetch_comments.py resolves fork PRs against the head repo

1 participant