Skip to content

feat(reports): split monthly reports into planned vs opportunistic work#586

Merged
castrojo merged 3 commits intomainfrom
feat/planned-vs-opportunistic-work
Jan 27, 2026
Merged

feat(reports): split monthly reports into planned vs opportunistic work#586
castrojo merged 3 commits intomainfrom
feat/planned-vs-opportunistic-work

Conversation

@castrojo
Copy link
Contributor

Summary

Split monthly reports into 📋 Planned Work (tracked on project board) and ⚡ Opportunistic Work (fixed directly in monitored repos) to provide a complete picture of all project activity.

Motivation

Previously, monthly reports only showed items tracked on the project board (todo.projectbluefin.io). This missed the significant amount of work happening organically across repositories—quick fixes, drive-by improvements, and community contributions that go straight to PRs without formal tracking.

This change surfaces all work happening across the Bluefin ecosystem.

Changes

New Features

  • ✅ Fetch closed issues/PRs from 10 monitored repositories
  • ✅ Compare with project board to identify opportunistic work
  • ✅ Split each category into 📋 Planned and ⚡ Opportunistic subsections
  • ✅ Deduplicate items across categories (show once in most relevant section)
  • ✅ Filter contributors to PR authors only (not issue reporters)
  • ✅ Filter out AI bots (copilot-swe-agent, dependabot, renovate, etc.)

Files Modified

  • scripts/lib/monitored-repos.js - NEW: Configuration of 10 monitored repos
  • scripts/lib/graphql-queries.js - Added repo-level closed items query
  • scripts/generate-report.js - Fetches and separates planned vs opportunistic
  • scripts/lib/markdown-generator.js - Generates split subsections with deduplication
  • scripts/lib/contributor-tracker.js - Added copilot-swe-agent to bot filters
  • reports/2025-12-31-report.mdx - Regenerated with new format

Monitored Repositories

  1. ublue-os/bluefin
  2. ublue-os/bluefin-lts
  3. ublue-os/aurora
  4. projectbluefin/common
  5. projectbluefin/documentation
  6. projectbluefin/branding
  7. projectbluefin/iso
  8. projectbluefin/dakota
  9. ublue-os/distroless
  10. projectbluefin/workshops

Impact

December 2025 Report

  • Total items: 187 (8 planned + 179 opportunistic)
  • Contributors: 21 PR authors (bots excluded)
  • Shows reality: Most work happens organically, not formally tracked

Report Structure

Each Focus Area and Work Type category now has:

## 🖥️ Desktop Environment

### 📋 Planned Work
- Items from project board with "desktop" label

### ⚡ Opportunistic Work
- PRs/issues closed in monitored repos with "desktop" label
- Not tracked on project board

Technical Decisions

  1. Deduplication Logic

    • Items with multiple labels appear only once (first matching category)
    • Prevents same PR from appearing under both "Desktop" and "Bug" sections
    • Uses Set to track displayed URLs across all sections
  2. Contributors = PR Authors Only

    • Changed from all issue/PR participants to merged PR authors only
    • More accurately reflects code contributors vs issue reporters
    • Reduced December count: 54 → 21 (much more realistic)
  3. Bot Filtering

    • Filters human vs bot activity separately
    • Bot section shows automated maintenance work
    • Human sections show only people contributions
  4. GraphQL Item Type Detection

    • Added __typename field to opportunistic items
    • Enables proper filtering between Issues and PullRequests
    • Matches project board item structure

Testing

Build validated: npm run build completes successfully
Dev server tested: Report renders correctly at http://localhost:3000/reports
December regenerated: 187 total items, 21 contributors, no duplicates
Deduplication verified: Items appear only once across all categories
Bot filtering verified: copilot-swe-agent excluded from human contributors

Preview

You can test this locally:

# Regenerate December report
GH_TOKEN=$(gh auth token) npm run generate-report

# Start dev server
npm start

# View report
open http://localhost:3000/reports/2025/12/31/report

Known Limitations

  1. No pagination - Repos with >100 closed items/month will be truncated
  2. No caching - Fetches fresh from all 10 repos every time (~5-7s)
  3. January not regenerated - Still uses old single-section format

These can be addressed in future PRs if needed.

Follow-up Tasks

  • Regenerate January 2026 report with new format
  • Consider adding pagination for high-activity repos
  • Consider caching closed items (24h TTL like other fetchers)

Related

  • Implements transparency goals from project mission
  • Complements existing contributor tracking system
  • Works with label-based categorization (Desktop, Dev, Ecosystem, etc.)

Ready for review! This is a significant enhancement to the monthly report system that surfaces all work happening across the Bluefin project, not just formally tracked items.

Add subsections to each Focus Area and Work Type category showing:
- 📋 Planned Work: Items tracked on project board
- ⚡ Opportunistic Work: Items fixed directly in repos without board tracking

Changes:
- Created monitored-repos.js config with list of tracked repositories
- Added fetchClosedItemsFromRepo() to fetch closed issues/PRs from GitHub repos
- Updated generate-report.js to fetch opportunistic work from all monitored repos
- Modified markdown-generator.js to split each category into subsections
- Updated summary to show breakdown: Total, Planned, Opportunistic

Impact:
- December 2025 report shows 8 planned + 182 opportunistic items
- Makes reports more comprehensive by capturing ALL work done
- Shows true project velocity beyond just board tracking
- Helps identify popular areas for organic contributions

Assisted-by: Claude Sonnet 4 via Cline
Fixes two issues with opportunistic work reporting:

1. **Deduplicate items across categories**
   - Items with multiple labels now appear only once (in first matching category)
   - Use Set to track displayed URLs across all sections
   - Pass displayedUrls set through category generation functions

2. **Contributors = PR authors only (people who wrote code)**
   - Previously counted all issue/PR closers (54 people)
   - Now only counts merged PR authors (22 people)
   - Better reflects actual code contributors vs issue reporters
   - Added __typename field to opportunistic items transformation

Impact:
- December report: 190 unique items (was showing duplicates before)
- 22 contributors (down from 54) - more accurate representation
- Each item appears exactly once in most relevant category

Assisted-by: Claude Sonnet 4 via Cline
Filter out copilot-swe-agent bot from contributor lists in monthly reports.
This ensures only human contributors are counted and displayed.
@castrojo castrojo merged commit 2e50055 into main Jan 27, 2026
2 checks passed
@castrojo castrojo deleted the feat/planned-vs-opportunistic-work branch January 27, 2026 06:16
castrojo added a commit that referenced this pull request Jan 27, 2026
Replace project board API dependency with repository-based tracking:
- Planned work: merged PRs from projectbluefin/common
- Opportunistic work: merged PRs from other monitored repos
- Filter out closed issues (only include merged PRs)

This approach:
- Works with standard GITHUB_TOKEN (no project:read scope needed)
- Captures ~50% of planned work based on historical data
- Removes dependency on organization-level Projects V2 API

December 2025 report regenerated with new approach:
- 49 planned PRs (was 8, excluded 9 issues)
- 78 opportunistic PRs (was 179, excluded 55 issues)
- All items now show merged contributions only

Refs: #586 (planned vs opportunistic work split)
castrojo added a commit that referenced this pull request Jan 27, 2026
Regenerate January 2026 monthly report to include structural improvements:
- Split categories into Planned vs Opportunistic subsections
- Use projectbluefin/common for planned work tracking
- Separate Focus Area (area/ labels) from Work by Type (kind/ labels)
- Apply proper bot filtering and contributor tracking
- Fix MDX curly brace escaping in PR titles to prevent build errors

Script improvements:
- Add --month=YYYY-MM CLI argument for report regeneration
- Escape curly braces in PR/issue titles to prevent MDX/JSX parsing errors
- Applied fix to all formatItemList functions in markdown generator

Previous report was generated before PRs #586 and #587 were merged.
This regeneration brings the January report up to date with current format.

Fixes MDX build error: "boot is not defined" caused by unescaped curly
braces in PR titles like "/{boot,tmp}" being interpreted as JSX.

Refs: #586, #587
@castrojo castrojo added the kind/automation CI/CD workflows, scripts, and automation tooling label Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/automation CI/CD workflows, scripts, and automation tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant