Skip to content

[fix] engine: a pull request reads on a gh older than 2.63 - #184

Merged
gogoout merged 1 commit into
mainfrom
fix/gh-base-ref-oid
Oct 25, 2026
Merged

gogoout merged 1 commit into
mainfrom
fix/gh-base-ref-oid

Conversation

@gogoout

@gogoout gogoout commented Oct 25, 2026

Copy link
Copy Markdown
Member

dfr review --pr asked gh pr view for baseRefOid. gh has that --json field only since 2.63 (December 2024). An older gh rejects the whole call:

Unknown JSON field: "baseRefOid"

Now gh pr view --json number,url only finds the request. That call still resolves the current branch's request 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. No gh version gates that answer. spec/forge.md names 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

`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
@gogoout

gogoout commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

@claude review

@claude

claude Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

@gogoout
gogoout merged commit 50baece into main Oct 25, 2026
1 check passed
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.

error in pr review

1 participant