Record PR assignees/requested reviewers and surface them on the pull card#476
Open
danielbeardsley wants to merge 6 commits into
Open
Record PR assignees/requested reviewers and surface them on the pull card#476danielbeardsley wants to merge 6 commits into
danielbeardsley wants to merge 6 commits into
Conversation
Capture the GitHub `assignees[]` array for pull requests, persist it in the `pulls` table (JSON-encoded in a new text column), emit it to the frontend, and show a small person icon on a pull card when the current user is one of the assignees. Mirrors the existing Issue-assignee handling (backend/DB) and the `participants` array (frontend shape + "includes me" conditional UI). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move the "assigned to you" icon from the top-left corner (where it was hidden behind the commit-status bar) to inline before the pull title. Add assignees to a few dummy pulls to exercise both UI states. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the separate assignee component with color on the existing participants icon: green when assigned to you, blue when participating, grey otherwise. Icon shape still encodes participant quantity, and the tooltip reflects the assigned state. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Change the `assignees` column from text to a native JSON column. mysql2 auto-parses JSON columns on read, so getFromDB no longer JSON.parses the value; the write path keeps JSON.stringify to safely populate the column. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
Member
Author
|
dev_block 👍 Working on adding requested_reviewers here, as that was the actual intent. |
Data pipeline (mirrors assignees): capture requested_reviewers from the GitHub payload, persist to a new JSON column (migration 0021), and emit to the frontend. UI: treat assignees as additional authors — blue star when you are the author or an assignee, otherwise the first author's avatar with all authors listed on hover. Surface requested_reviewers as a blue star before the "CR" text when a review is requested from you, whose hover lists all requested reviewers. The participants indicator reverts to participants-only. Expand the pull-card demo with Authors and ReviewRequests examples and give the dummy data assignees/requested_reviewers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
Extend isMineViaAffiliation to cover pulls where you are an assignee (via authoredByMe) or a requested reviewer, so Personal View surfaces them alongside your authored/signed/blocked/participating pulls. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
un_dev_block 👍 This now includes requested reviewers. Updates the UI and has the "Personal View" reflect this:
|
Member
Author
|
Though when deploying this, I'm not seeing the The data is in the DB (in dev) but it's not making it to the front-end. dev_block 👍 I can't work on this right now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Context
Pulldasher tracked a PR's author but neither its assignees nor its requested reviewers. This captures both from GitHub, persists them, sends them to the frontend, and surfaces them on the pull card so people can quickly spot PRs that involve them.
Both fields mirror the existing author handling (
getLogin, emitted viatoObject()).Backend / data pipeline
models/pull.js—fromGithubApiextractsassigneesandrequested_reviewers((data.<field> || []).map(getLogin));getFromDBreads the mysql2-auto-parsed arrays.models/db_pull.js—JSON.stringifys each into its DB column.0020-pulls--add-assignees.sqland0021-pulls--add-requested-reviewers.sql+schema.sql— two native JSON columns onpulls. AllSELECT *reads and theREPLACE INTOwrite need no other change.Frontend
types.ts—assignees: string[]andrequested_reviewers: string[]onPullData.pull.ts—authors()(author + assignees, deduped),authoredByMe(), andreviewRequestedFromMe()helpers.Avatargained an optionaltitle).Demo & fixtures
frontend/dummy-pulls.json— assignees and requested_reviewers on several pulls.pull-card-demo/named-pulls— new Authors and Review Requests example rows (plus factory defaults for the new fields), exercising the multi-author hover and the multi-reviewer star tooltip.Verification
[]; missing payload →[]).tsc --noEmitand ESLint clean; production webpack build (both entrypoints) succeeds.Not automated here: applying the migrations to a real DB and driving a live GitHub webhook — run
npm run frontend:startto eyeball the indicators against the dummy data.🤖 Generated with Claude Code