Skip to content

EXC-2098 Read a PR's code owners and reviewers - #67

Merged
macintacos merged 5 commits into
EXC-2097/codeowners-sandbox-repo-in-excessive-devfrom
EXC-2098/read-a-prs-code-owners-and-reviewers
Oct 29, 2026
Merged

macintacos merged 5 commits into
EXC-2097/codeowners-sandbox-repo-in-excessive-devfrom
EXC-2098/read-a-prs-code-owners-and-reviewers

Conversation

@macintacos

Copy link
Copy Markdown
Owner

Part of: EXC-2098

Change Kind: new feature

What changed

On a pull request's Files changed tab, gh-prism now reads each changed file's code owners (in CODEOWNERS order, linked when the token is a valid @user or @org/team, with whether you own the file) and the PR's reviewers, from the same two page_data endpoints GitHub's own page reads, so it needs no CODEOWNERS parser. The content script fetches them once per visit, same-origin with your session, and hands the promise to every page of the visit; either read failing or answering an unexpected shape leaves no owners and no reviewers, and the rest of gh-prism works as before. Nothing draws the result yet: the sidebar shield, owner filter, and filter-menu section (EXC-2099, EXC-2100, EXC-2101) build on it.

What to test

Findings the issue asked to record

  • page_data/codeowners covers every changed path on the sandbox's large PR #3: 152 of 152, including web/src/catalog.ts behind "Load Diff", with no paging or truncation field.
  • page_data/merge_box leaves comment-only reviews out: on src: fix build with --shared-brotli nodejs/node#66895, the two reviewers who only commented are missing from latestOpinionatedReviews, so gh-prism misses reviewers who only commented.
  • onBehalfOf was empty on every review checked (about 460 public PRs); gh-prism reads an element as a team by its login (org/slug), the shape pendingReviewRequests uses, and skips any other, unverified until a review on a team's behalf is captured.

Reviewer checks

  • onBehalfOf's real shape. When a member of a requested team (on the sandbox, an account other than the PR's author in excessive-dev/frontend) reviews on the team's behalf, fetch that PR's page_data/merge_box signed in and confirm the element carries login: "<org>/<slug>"; if not, reviewersFrom reads the wrong field.
  • Read the new docs/ARCHITECTURE.md and docs/agents/github-rules.md sections.
  • Every Files changed visit now makes these two requests before any view reads them; release this layer together with EXC-2099 rather than on its own.

- Read page_data/codeowners and page_data/merge_box, same-origin,
  resolving undefined for a commit or on any failed or odd read
- Link @user and @org/team owners; match reviewers ignoring case
- Export pr-ref's at() for the shape checks
- Add scrubbed sandbox and nodejs/node payloads as fixtures
onVisit reads a pull request's code owners and reviewers once per
Files changed visit and hands the promise to every page's showVisit.
Nothing awaits it yet; a commit or header tab reads nothing.
- ARCHITECTURE: how the content script reads page_data, and what
  the result holds
- github-rules: the endpoints' header, shapes, gaps, and re-check
- README: github.com now also serves code owners and reviewers
- Link and keep Enterprise Managed User logins, which carry `_`
- Count an onBehalfOf team only in its org/slug form
- Name the endpoint whose shape broke; document never-rejects
- Test an array ownershipByPath and missing reviews
- Coin code owner and PR reviewer in CONTEXT; record the
  merge_box fixture scrub; fix the stale architecture overview
@linear-code

linear-code Bot commented Oct 28, 2026

Copy link
Copy Markdown

EXC-2098

@macintacos
macintacos added this pull request to stack #68 October 28, 2026 06:15
@macintacos
macintacos merged commit 658e779 into trunk Oct 29, 2026
6 checks passed
@macintacos
macintacos deleted the EXC-2098/read-a-prs-code-owners-and-reviewers branch October 29, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant