Skip to content

feature: support reviewing a specific PR in crit, especially for stacked diffs #300

@omry

Description

@omry

Problem

crit in git mode reviews the current local branch/stack against its base. That works well for simple branches, but it gets awkward in stacked-diff workflows.

In a stacked PR setup (for example Sapling stacks, ghstack-like workflows, or multiple dependent PRs on one local stack), running crit shows the whole stacked diff instead of just the PR I want to review. That makes it hard to review one PR in isolation while still testing it locally on top of its dependencies.

Example

Suppose I have:

  • PR A: base change
  • PR B: depends on A
  • PR C: depends on B

Locally, my working stack contains all three. If I want to review just PR B in crit, crit currently shows the full stacked diff instead of the PR-scoped slice.

The current workaround is to:

  • review explicit files with crit <file...>, or
  • manually reshape/rebase the local stack first

Both are inconvenient, especially when PR comments are tied to a specific GitHub PR.

Requested feature

Add support for reviewing a specific PR directly, for example:

crit --pr 295

or

crit pr 295

and ideally also support PR URLs:

crit --pr https://github.com/owner/repo/pull/295

Desired behavior

When a PR is specified, crit should scope the review to that PR’s diff only, not the entire local stack.

This is especially important for stacked-diff scenarios where:

  • the local checkout intentionally contains multiple dependent commits/PRs
  • I want to test locally on top of dependencies
  • but I only want to review the files/hunks that belong to one PR

Possible implementation ideas

Any of these would help:

  • resolve the PR’s base/head and review only that diff range
  • support explicit commit-range review in git mode
  • integrate PR-scoped review with existing GitHub PR sync (crit pull / crit push)

Why this would help

This would make crit much easier to use in modern stacked-review workflows, especially with Sapling or other dependent-PR setups, where "current branch diff" is not the same thing as "the PR I want to review".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions