Skip to content

Ability to request re-review after addressing requested changes on a PR #2053

Open

Description

@bigpresh

Describe the feature or problem you’d like to solve

Scenario:

  • I've raised a PR, requested reviews, one or more reviewers has requested changes
  • I've checked out the PR branch (handily via gh pr checkout...) and made the appropriate changes and pushed them

At the moment, it looks like I can't then request a re-review other than opening the PR in a browser and clicking the "request re-review" next to each reviewer.

It would be really nice, once I've made suitable changes and pushed them, to be able to request re-review via the gh cli tool rather than having to open the PR in a browser and click the request re-review button next to the reviewer(s) who requested changes.

Proposed solution

Maybe something like gh pr request-rereview or something like that? Not sure whether it should automatically request a re-review from all reviewers who had requested changes, or present a list of them if there were more than one and let you select which reviewer(s) you'd like to request a re-review from. (Presumably if there is only one reviewer who requested changes, then just requesting a re-review from them is a no-brainer.)

Might turn out to not be particularly easy, though, as looking at https://developer.github.com/v3/pulls/reviews/ I don't see an API route to request a re-review, so if it's not exposed via the API... In case it helps, looking at what the web interface does when I request a re-review, it triggers a POST to https://github.com/owner/repo/pull/123/review-requests?pr_global_id=xxx with re_request_reviewer_id set.

Activity

  1. vilmibm commented on Oct 22, 2020

    @vilmibm
    Contributor

    I like the idea of supporting this (something like gh pr request <username> that can be used multiple times).

    I think the next step for this is to see if either the REST or GraphQL affordance for requesting a review can be used multiple times to re-request. If that doesn't work it might be possible to review and re-add reviewers but at that point it might not be worth it.

  2. added
    coreThis issue is not accepting PRs from outside contributors
    on Oct 22, 2020
  3. MarcCelani-at commented on Dec 3, 2021

    @MarcCelani-at

    We are very interested in a feature like this. We'd love to set up a gh action to automatically re-request review when a PR is updated, which is a feature of phabricator that we generally like.

  4. zodman commented on Dec 29, 2021

    @zodman

    Some news about these ?

  5. zodman commented on Jan 13, 2022

    @zodman

    here I recently discover doing

    gh pr edit --remove-reviewer
    and then
    gh pr edit --add-reviewer

    re-request review ... someone could confirm
    @MarcCelani-at @bigpresh

  6. CrisFavero commented on Oct 13, 2022

    @CrisFavero

    I was also looking for this feature today.

  7. CraigSiemens commented on Oct 18, 2022

    @CraigSiemens

    We were looking to do this as well.

    We did find calling gh pr edit --add-reviewer seems to work. The only issue is it moved any reviewers added again to be moved to the bottom of the reviewer list.

  8. added
    gh-prrelating to the gh pr command
    on Oct 2, 2023
  9. jjackson2-legalzoom commented on Feb 2, 2024

    @jjackson2-legalzoom

    While a dedicated API endpoint or CLI command for this would be great, really this should just be a setting for the repo itself or for a Branch Protection Rule (analogous to "Dismiss stale pull request approvals when new commits are pushed") - and, IMO, it should be default-on. Why wouldn't you want someone to re-review your changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLIgh-prrelating to the gh pr command

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions