Skip to content

Implement Sub-Task 5: fetch implementation PR metadata and reviews - #14

Merged
afrittoli merged 3 commits into
mainfrom
subtask_5
Jul 27, 2026
Merged

Implement Sub-Task 5: fetch implementation PR metadata and reviews#14
afrittoli merged 3 commits into
mainfrom
subtask_5

Conversation

@afrittoli

@afrittoli afrittoli commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds scripts/fetch_impl_prs.py (Sub-Task 5): reads raw/teps.jsonl, extracts every (repo, pr_number) implementation PR link across all TEPs (not a curated Pass 1 sample — matches the "run all" precedent Sub-Task 4 established), and fetches PR metadata + reviews + review comments from the GitHub REST API generically across whatever tektoncd/* repos are actually linked (13 repos observed, not just the 7 named in the plan's context note).
  • 404s (deleted/transferred PRs) are recorded as {"repo", "pr_number", "status": 404} rather than dropped, per the plan.
  • Every record (fetched or 404) carries discovered_via: "tep_file_link", per the plan's spec — this is the only discovery mechanism implemented so far; Sub-Task 6 (cross_repo_search.py, not yet built) will later tag its own org-wide-search finds "search", making the under-linking rate measurable.
  • Adds reports/impl_prs_report.html with an "Implementation PRs by TEP" table — one row per TEP listing its linked implementation PR(s), each with a review-decision badge (or 404/not-fetched badge) — plus coverage, per-repo breakdown, and a flat PR list. Matches the HTML-report pattern fetch_tep_prs.py established for Sub-Task 4.
  • Adds scripts/build_report_index.py: a tabbed index page (reports/index.html) that embeds every reports/*.html in an iframe behind a tab, labelled from each report's <title>. Reports are discovered by scanning the directory, so a new report needs no index update. New make report-index target.
  • Ran make fetch-impl-prs for the full set: 254 unique implementation PRs fetched, 0 not found, 5740 review comments — committed to raw/impl_prs.jsonl / raw/impl_pr_reviews.jsonl.
  • Also fixes the one remaining TEP-0192 reference in pyproject.toml's description, missed in the earlier renumbering pass (Update TEP-0192 references to TEP-0173 #13).

Test plan

  • uv run ruff check scripts/ tests/
  • uv run ruff format --check scripts/ tests/
  • uv run mypy scripts/
  • uv run pytest --cov=scripts --cov-report=term-missing (96 passed)
  • npx markdownlint-cli "**/*.md" (matches CI's markdownlint-cli2 config)
  • Verified reports/index.html and the TEP-mapping table (spot-checked TEP-0084, which has 7 linked chains PRs) — structural/HTTP check only, did not visually drive the tab-click interaction in a real browser
  • Verified all 254 existing raw/impl_prs.jsonl records were backfilled with discovered_via (no records missing it), without re-hitting the GitHub API

Adds scripts/fetch_impl_prs.py, which reads raw/teps.jsonl, extracts
every (repo, pr_number) implementation PR link across all TEPs (not
just a curated Pass 1 sample, matching the "run all" precedent set by
Sub-Task 4), and fetches PR metadata + reviews + review comments from
the GitHub REST API generically across whatever tektoncd/* repos are
actually linked. 404s (deleted/transferred PRs) are recorded rather
than dropped. Adds an HTML coverage report, matching the pattern
established by fetch_tep_prs.py.

Also adds scripts/build_report_index.py: a tabbed index page
(reports/index.html) that embeds every reports/*.html file in an
iframe behind a tab, discovered by scanning the directory so new
reports need no index update.

Ran `make fetch-impl-prs` for the full set: 254 unique implementation
PRs fetched (0 not found), 5740 review comments collected, committed
to raw/impl_prs.jsonl and raw/impl_pr_reviews.jsonl.

Also fixes the last remaining TEP-0192 reference in pyproject.toml's
description (missed in the earlier renumbering pass).

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
The report previously only listed implementation PRs standalone
(by repo, with review decision and size), with no way to see which
TEP each PR belongs to. Adds an "Implementation PRs by TEP" table:
one row per TEP with implementation PR links, listing each linked
PR with a review-decision badge, or a 404/not-fetched badge when
the PR record is missing.

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
data-collection-plan.md specifies that Sub-Task 5 records should carry
discovered_via: "tep_file_link" so Sub-Task 6 (cross_repo_search.py,
not yet built) can tag its own org-wide search results "search" and
make the under-linking rate measurable. This was missing from the
initial implementation. Adds it to both successful and 404 records,
and backfills the 254 existing raw/impl_prs.jsonl records fetched so
far (no re-fetch needed, the data itself is unchanged).

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
@afrittoli
afrittoli merged commit aa21bf6 into main Jul 27, 2026
4 checks passed
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