Repository navigation
[fix] engine: a pull request reads on a gh older than 2.63 - #184
Merged
Merged
Conversation
`dfr review --pr` asked `gh pr view` for `baseRefOid`, a `--json` field
gh has only since 2.63. An older gh rejects the whole call with
`Unknown JSON field: "baseRefOid"`, so no request could be opened.
`gh pr view --json number,url` now only finds the request, which is what
resolves the current branch's when no number is given. The refs come
from `gh api repos/{owner}/{repo}/pulls/<n>`: `base.ref`, `base.sha`,
`head.sha` and `html_url`, which no gh version gates.
Checked by hand against gh 2.62.0 and 2.103.0 on a live PR: both reach
the reviewer.
Closes #183
Member
Author
|
@claude review |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
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.
dfr review --praskedgh pr viewforbaseRefOid. gh has that--jsonfield only since 2.63 (December 2024). An older gh rejects the whole call:Now
gh pr view --json number,urlonly finds the request. That call still resolves the current branch's request when no number is given. The refs come fromgh api repos/{owner}/{repo}/pulls/<n>:base.ref,base.sha,head.shaandhtml_url. No gh version gates that answer.spec/forge.mdnames both calls and says why.Checked by hand on a live PR with gh 2.62.0 (which reproduces the issue on
main) and gh 2.103.0: both reach the reviewer.Closes #183