skills(fix): resolve PR comments from base repository#497
Open
Ducksss wants to merge 1 commit into
Open
Conversation
Summary: - Parse the PR URL from gh pr view to identify the repository that owns the pull request number. - Add a regression test for fork PRs where the head repository differs from the base repository. Rationale: - Review-thread GraphQL queries must use the base repository because PR numbers belong there, not in contributor forks. - Keeping the lookup anchored to gh pr view preserves the existing current-branch workflow while fixing cross-repo PRs. Tests: - python3 -m unittest discover -s tests - python3 -m py_compile skills/.curated/gh-address-comments/scripts/fetch_comments.py tests/test_gh_address_comments_fetch_comments.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #495.
Summary
gh pr view.Reproduction
gh pr viewreports head repositoryNick2bad4u/oh-my-poshbut the PR URL isJanDeDobbeleer/oh-my-posh/pull/7582.get_current_pr_ref()returned the fork owner, causing GraphQL to query a PR number that does not exist in the fork.Tests
python3 -m unittest discover -s testspython3 -m py_compile skills/.curated/gh-address-comments/scripts/fetch_comments.py tests/test_gh_address_comments_fetch_comments.py