Skip to content

[Bug]: "Review" button on a PR still reviews against the default branch not the PR target branch #191

Description

@Patabugen

Platform

macOS

Operating system version

macOS 26

System architecture

ARM64 (M1, M2, etc)

PolyScope Version

0.2.22

Bug description

When I've created a workspace from a PR, I'd expect the Review button to only review the changed form that PR.

In case of stacked PRs it's always reviewing against the default branch (e.g. develop).

I've added these to my "Default Review Preferences" in the Coding Agents settings which causes the agent to only review the changes on the PR.

tbh it would ben nice to have this always - but especially in the case of creating from a PR we know that there will be a base branch and the user is using git hub so I feel it's safe to ask the agent to go looking for it (although maybe we can't assume the user has the gh cli tool).

If this branch has an open PR, diff against the PR's base branch rather than hardcoding develop. Retrieve it with: `gh pr view --json baseRefName -q .baseRefName` then diff with git diff origin/<base-branch>...HEAD. If no PR exists, fall back to develop.

Steps to reproduce

Something like:

git checkout develop
git checkout -b feature/feature-one
git commit --allow-empty -m"An empty commit so we can create a PR for feature one"
git push
# Now create a PR from `feature/feature-one`

git checkout -b feature/feature-two
git commit --allow-empty -m"An empty commit so we can create a PR for feature two"
git push
## Create the PR from `feature/feature-two`

In Polyscope create a new workspace form the Feature Two PR.

Click the Review button.

It'll review feature/feature-one...develop and not feature/feature-two...develop

Relevant log output

none

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions