Skip to content

feat(foc-pr-report): FOC Project 14 open-PR summary report#24

Open
BigLep wants to merge 3 commits intomasterfrom
biglep/foc-project-pr-report
Open

feat(foc-pr-report): FOC Project 14 open-PR summary report#24
BigLep wants to merge 3 commits intomasterfrom
biglep/foc-project-pr-report

Conversation

@BigLep
Copy link
Copy Markdown
Contributor

@BigLep BigLep commented Apr 1, 2026

Summary

This adds foc-pr-report, a small uv-packaged CLI that generates a Markdown snapshot of pull requests on FilOzone Project 14 (FOC) under the same View 2 filter we already use elsewhere: is:pr excluding Done and Todo. The goal is a single readable summary of in-flight PR work: who it touches, which lane each card is in, and how load is spread across repositories.

Shared logic from earlier tpm-utils work

Rather than duplicating GitHub calls, the report builds on shared Project 14 plumbing in foc_project14_client.py:

  • REST list project items with server-side q so we only fetch cards that match the board filter (scalable when the project is large).
  • Normalization of REST payloads to the same GraphQL-shaped item structure other scripts expect.
  • Submitted pull request reviews enrichment (union with requested_reviewers) so person-level reviewer counts stay closer to what the board shows than requested reviewers alone.

The FOC workload notifier (foc_wg_pr_notifier.py) was refactored to use that client as well, so fixes and behavior stay in one place.

What the report contains

  1. PR count by individual — Table keyed by person (plus an empty row for PRs with no assignee or no user reviewer), with linked drill-downs to View 2 search.
  2. PR count by repository and status — Matrix of PR counts by repo and board status, with Total row and column and the same link patterns as the person table.

Usage

See foc-pr-report/README.md. Requires read:project (e.g. gh auth refresh -s read:project).

cd foc-pr-report
GITHUB_TOKEN=$(gh auth token) uv run foc-pr-report -o foc-report.md

Scope note

This tool is intentionally summary-oriented: one Markdown artifact for humans and weekly posts, not a replacement for per-squad notifiers or deep automation. Shared client code keeps maintenance cheap while the report answers “what’s open on the FOC board right now?” in one pass.

Made with Cursor

BigLep added 3 commits March 31, 2026 20:35
Add foc-pr-report uv package: REST board q filter, Markdown table, reviewer enrichment via PR reviews API.

Add foc_project14_client for shared Project 14 GraphQL and REST helpers.

Refactor foc_wg_pr_notifier to use shared fetch and field_values_by_name.

Document token scope, fetch behavior, and reviewer vs requested-review semantics.

Made-with: Cursor
- Add synthetic empty row (no assignee / no reviewer) with board search links
- Add Total row and column to PR count by repository and status
- Rename first workload column to who; document output in README
- Wire CLI through render_full_markdown for both tables

Made-with: Cursor
Mirror the repository table structure with a ## section title and align README wording.

Made-with: Cursor
@FilOzzy FilOzzy added this to FOC Apr 1, 2026
@github-project-automation github-project-automation bot moved this to 📌 Triage in FOC Apr 1, 2026
@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC Apr 1, 2026
@BigLep BigLep requested review from Copilot and rjan90 and removed request for rjan90 April 1, 2026 03:56
@BigLep BigLep self-assigned this Apr 1, 2026
@BigLep
Copy link
Copy Markdown
Contributor Author

BigLep commented Apr 1, 2026

Example output from running

GITHUB_TOKEN=$(gh auth token) uv run foc-pr-report

REST fields page 1: +16 (unique names 16)
REST items page 1... got 21 (total 21)
Total REST items matching q: 21
Fetching submitted reviews for 21 pull request(s)...
reviews 10/21...
reviews 20/21...

PR count by individual

who state assignee reviewer
BigLep 🔎 Awaiting review 1 2
BigLep ✔️ Approved by reviewer 0 1
Chaitu-Tatipamula ⌨️ In Progress 2 0
Chaitu-Tatipamula 🔎 Awaiting review 3 0
Chaitu-Tatipamula ✔️ Approved by reviewer 1 0
hugomrdias ⌨️ In Progress 0 1
hugomrdias 🔎 Awaiting review 0 3
hugomrdias ✔️ Approved by reviewer 0 1
juliangruber ⌨️ In Progress 0 4
juliangruber 🔎 Awaiting review 0 3
kaola526 🔎 Awaiting review 1 0
Kubuxu 🔎 Awaiting review 0 1
nijoe1 🔎 Awaiting review 1 0
rjan90 🔎 Awaiting review 0 1
rjan90 ✔️ Approved by reviewer 1 0
rvagg ⌨️ In Progress 2 1
rvagg 🔎 Awaiting review 1 4
rvagg ✔️ Approved by reviewer 1 1
SgtPooki ⌨️ In Progress 0 6
SgtPooki 🔎 Awaiting review 0 1
SgtPooki ✔️ Approved by reviewer 0 2
silent-cipher ⌨️ In Progress 2 3
silent-cipher 🔎 Awaiting review 0 1
silent-cipher ✔️ Approved by reviewer 0 2
wjmelements ⌨️ In Progress 2 0
wjmelements 🔎 Awaiting review 1 0
wjmelements ✔️ Approved by reviewer 1 0
ZenGround0 🔎 Awaiting review 1 0
empty 🔎 Awaiting review 0 2

PR count by repository and status

Repository ⌨️ In Progress 🔎 Awaiting review ✔️ Approved by reviewer Total
filecoin-project/curio 0 1 0 1
filecoin-project/filecoin-pin 2 0 1 3
filecoin-project/filecoin-pin-website 1 0 0 1
FilOzone/dealbot 4 1 2 7
FilOzone/filecoin-pay-explorer 0 1 0 1
FilOzone/filecoin-services 0 1 0 1
FilOzone/infra 0 0 1 1
FilOzone/pdp-explorer 0 1 0 1
FilOzone/synapse-sdk 1 3 0 4
FilOzone/tpm-utils 0 1 0 1
Total 8 9 4 21

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new foc-pr-report uv-packaged CLI that generates a Markdown snapshot of FilOzone Project 14 PR workload, and refactors existing FOC notifier code to reuse shared Project 14 fetching utilities.

Changes:

  • Introduces foc-pr-report CLI to render (1) person × status workload and (2) repo × status matrix with View 2 deep links.
  • Adds foc_project14_client.py as shared Project 14 client code (GraphQL full fetch + REST filtered listing + reviewer enrichment).
  • Refactors foc_wg_pr_notifier.py to use the shared client’s project fetching and field-value normalization.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Documents the new FOC PR report tool and points to shared Project 14 client.
foc-pr-report/uv.lock Adds uv lockfile for the new CLI tool environment.
foc-pr-report/README.md Usage + explanation of reviewer semantics and link behavior for the report.
foc-pr-report/pyproject.toml Defines foc-pr-report package metadata and console script entrypoint.
foc-pr-report/foc_pr_report/report.py Implements aggregation + Markdown rendering for person table and repo/status matrix.
foc-pr-report/foc_pr_report/cli.py CLI entrypoint: token handling, fetch items, enrich reviewers, render/write Markdown.
foc-pr-report/foc_pr_report/init.py Package marker.
foc-pr-report/.gitignore Ignores venv and bytecode for the new tool directory.
foc_wg_pr_notifier.py Refactors to reuse foc_project14_client for fetching and field parsing.
foc_project14_client.py New shared client: GraphQL pagination, REST filtered item listing + normalization, reviewer enrichment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BigLep BigLep requested a review from rjan90 April 1, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 Awaiting review

Development

Successfully merging this pull request may close these issues.

3 participants