Repository navigation
feat(github): Remove the person who dismisses a PR item from its reviewers - #4312
sentry-junior[bot] wants to merge 28 commits into
Conversation
…ewers A dismiss on a Junior pull request item now removes only the person who dismissed it. When GitHub lists them as a requested reviewer, Junior removes them there first, and a GitHub refusal fails the dismiss. A requester, such as on Ready to merge, holds no reviewer role, so their dismiss changes nothing on GitHub. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This comment has been minimized.
This comment has been minimized.
…' into feat/github-pr-dismiss-reviewer Co-Authored-By: BYK <[email protected]>
…on the PR item A requested reviewer with a linked account now gets the pull request's item even when they are not in the owner Conversation, as an issue assignee does. Their card shows the item and the pull request, and no Conversation unless they can see it. A review asked only of people with no linked account gets no item, so it is never up for grabs. The pull request kind keeps its flag under the new assigneeRoles name, which the merge of the base branch took over from dismissLeaves. Co-Authored-By: BYK <[email protected]>
BYK
left a comment
There was a problem hiding this comment.
Two things:
- We should show this as a tooltip on the "Dismiss" button to reduce the surprise factor
- Dismissing a PR review that a user themselves created should NOT dissociate their ownership, just their Review request/responsibility. So when the PR shows up under "Code/Mine" with "Waiting on others" and it sends regular merge conflict or "ready to merge" notifications to the owner/creator.
…' into feat/github-pr-dismiss-reviewer
…review A requester whose review Junior asked for can dismiss that ask. It removes only their review request: once the pull request is approved, the merge ask comes to them on a new item.
…' into feat/github-pr-dismiss-reviewer Co-Authored-By: BYK <[email protected]>
|
@BYK on your review:
|
A dismiss of a GitHub item can change GitHub: it removes a reviewer from the requested reviewers, or unassigns an issue assignee. The Dismiss button now says so in its tooltip, so the change is no surprise. Plugin subject kinds get an optional per-viewer dismissNote, and the Inbox payload sends it as subject dismissNote. A pull request's note shows only when its card lists the viewer as a requested reviewer, so a requester's dismiss says nothing more. Every assignee of an issue's item is its GitHub assignee, so the issue's note always shows. The inbox-item-fields baseline gets the one subject field, and design/inbox.md gets the confirmed line. Co-Authored-By: BYK <[email protected]>
The card lists at most five requested reviewers, so a sixth reviewer got no note, though their dismiss still removes them on GitHub. While the item asks for a review, everyone on it holds a review request, so the note now shows for that ask. Once it asks for the merge, the card's list still decides, and the requester gets none.
Tooltips show only on a wide screen with a fine hover pointer, so a phone never showed what Dismiss also changes on GitHub. Where tooltips are off, the card's action line now shows the note next to Dismiss. Co-Authored-By: BYK <[email protected]>
…' into feat/github-pr-dismiss-reviewer Co-Authored-By: BYK <[email protected]>
The note showed to everyone on an item that asked for a review, but the requester is on that item with no review request, so their dismiss changes nothing on GitHub. The card's reviewer list now decides. Only a full list, which can leave out a reviewer past its five, warns everyone on an item that asks for a review. Co-Authored-By: BYK <[email protected]>
A stack's Dismiss closes each open ask in it, which can remove the viewer from a pull request's reviewers on GitHub, but it showed no note. It now shows each distinct note of the asks that it closes. Co-Authored-By: BYK <[email protected]>
…' into feat/github-pr-dismiss-reviewer Co-Authored-By: BYK <[email protected]>
…' into feat/github-pr-dismiss-reviewer Co-Authored-By: BYK <[email protected]>
…' into feat/github-pr-dismiss-reviewer
…' into feat/github-pr-dismiss-reviewer
Removing a reviewer from a pull request that GitHub no longer serves failed the whole dismiss, so the person stayed on the item. A 404 or 410 now means nobody is left to remove, as it does for an issue's assignees.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6f978b0. Configure here.
…' into feat/github-pr-dismiss-reviewer
The stack header put its Dismiss note only in a tooltip, and phones have no tooltips. A tap could withdraw a GitHub review request with no warning. The note now shows under the stack header where tooltips are off, as it does on a card's action line. Both use one `DismissNote`.
…ismiss-reviewer Co-Authored-By: BYK <[email protected]>
The next-action read now needs the base ref and the branch rules, and a private Conversation now needs its own visibility, as in the other scenarios. Co-Authored-By: BYK <[email protected]>
…ismiss-reviewer Co-Authored-By: BYK <[email protected]> # Conflicts: # packages/junior/tests/integration/github-pull-request-ask.test.ts
…ismiss-reviewer Co-Authored-By: BYK <[email protected]> # Conflicts: # packages/junior/tests/integration/github-pull-request-ask.test.ts
…ismiss-reviewer Co-Authored-By: BYK <[email protected]>

The reviewer half of the
design/github.mddismiss rule and of thedesign/inbox.mdrole rule from #4308, which this stacks on. A requested reviewer can already see the pull request on GitHub, so their review ask belongs in their Inbox even when they are not in the Conversation that opened it. Dismissing the ask should withdraw the request on GitHub, which stays the source of truth.github:pull_requestsubject kind setsassigneeRoles. A requested reviewer with a linked account gets the item even when they are not in the owner Conversation. Their card shows the item and the pull request, but not the Conversation unless they can see it. A review asked only of people with no linked account gets no item, so it is never up for grabs.inboxItemDismissedhook finds the pull request from its code change (the subject id is the provider id), and reads its requested reviewers. If the dismisser's linked login is on the list, it callsDELETE /pulls/{n}/requested_reviewersfirst. If GitHub refuses, the dismiss fails with a 409 and the person stays.codeChangesfor the lookup.dismissNote, which the Inbox payload sends assubject.dismissNote. A reviewer's note reads "Also removes you from the reviewers on GitHub." It shows while the item asks for a review, or when the card lists the viewer as a requested reviewer. A requester on Ready to merge gets none. An issue assignee's note reads "Also unassigns you on GitHub." On a wide screen with a fine pointer, the note is Dismiss's tooltip. Elsewhere, such as on a phone, it shows on the card's action line. The inbox-item-fields baseline getsdismissNote, anddesign/inbox.mdgets "A plugin item's Dismiss says what else it changes on the provider."Dismiss note
Hidden Conversation
A review request card for a viewer who can see its Conversation (before), and for one whose role on the pull request is their only way in (after). The after card has no Conversation button, its title opens the item's own Inbox row, and it leaves the Conversation's stack. The card comes from #4308. These after shots were taken before 89ec9eb, which brings back the repo name, so the subtitle now reads
payments#91there too.via @BYK.
--
View Session [Sentry]