Skip to content

Add public/private repo visibility to reports and exports - #6

Merged
kgrizz-git merged 2 commits into
mainfrom
feature/public-private-visibility
Jul 22, 2026
Merged

Add public/private repo visibility to reports and exports#6
kgrizz-git merged 2 commits into
mainfrom
feature/public-private-visibility

Conversation

@kgrizz-git

Copy link
Copy Markdown
Owner

Summary

Implements repository visibility awareness (public/private/internal) across all report sections. Per-repo Actions tables now group by visibility with subtotals; other sections annotate non-public repos with [private] / [internal] tags. Introduces --only-public and --only-private CLI flags and config options to filter which repositories appear in repo-level sections.

Changes

Core visibility module

  • New visibility.py with helpers: repo_visibility(), group_by_visibility(), visibility_label(), filter_repos_by_visibility()
  • Centralized visibility resolution (prefers explicit visibility field, falls back to private boolean)

Data layer enrichment

  • All repo-level data structures now include visibility: Actions table, consumers, artifact/release details, storage analysis
  • Visibility propagated through derived data (legacy report consumers, artifact/release derivations)

Terminal rendering

  • Per-repo Actions table groups by visibility (private → internal → public) with per-group subtotals
  • Single-visibility tables render flat (no visual regression)
  • Top consumers and OS breakdown lists annotate repo names with tags
  • Summary sections annotate top consumers, findings, and recommendations

Email and exports

  • Plain-text and HTML email bodies annotate non-public repos in consumer/artifact/release lists
  • CSV and XLSX exports include visibility column after repo name in all repo-level sections
  • PDF exports annotate repo names with visibility tags
  • JSON exports retain visibility field on repo-level entries

CLI and configuration

  • Mutually exclusive --only-public / --only-private flags on both legacy and email report CLI
  • Config keys only_public / only_private in [email_report] section (default: false)
  • Workflow template inputs and shell wiring for manual dispatch overrides
  • Filters apply after --max-repos slice (documented caveat)

GUI/wizard

  • Setup Profiles panel adds visibility filter checkboxes with mutual exclusion
  • Wizard flow validates that both filters cannot be true simultaneously
  • Wizard screens sync and display visibility options alongside other report settings

Testing

  • New test modules: test_visibility.py, test_report_actions_visibility.py, test_setup_wizard_visibility.py
  • Extended existing tests for data enrichment, cache key generation, config persistence, and rendering
  • Fixture updates to include visibility in report data

User-facing impact

  • Legacy terminal reports now clearly separate Actions usage by repository visibility with grouped subtotals
  • Email and export reports tag non-public repos for easy identification
  • Users can filter reports to show only public or only private/internal repositories
  • Configuration and workflow dispatch support these filters for scheduled and manual runs

kgrizz-git and others added 2 commits July 22, 2026 16:00
Repo-level sections now carry visibility metadata, annotate non-public repos,
and support optional --only-public/--only-private filtering via CLI, config,
and scheduled workflows.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kgrizz-git, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 819f76d0-0df0-430f-bdf6-957b26e4fc88

📥 Commits

Reviewing files that changed from the base of the PR and between 579e15c and ac759d5.

📒 Files selected for processing (40)
  • .github-usage/config.example.toml
  • .github/workflows/email-report.yml
  • .github/workflows/email-report.yml.template
  • CHANGELOG.md
  • README.md
  • docs/superpowers/plans/archived/2026-07-22-public-private-visibility.md
  • src/github_usage/cli.py
  • src/github_usage/cli_email_report.py
  • src/github_usage/cli_parsers.py
  • src/github_usage/email_report_html.py
  • src/github_usage/email_report_text.py
  • src/github_usage/export_csv.py
  • src/github_usage/export_pdf.py
  • src/github_usage/export_xlsx.py
  • src/github_usage/gui/views/setup_profiles_panel.py
  • src/github_usage/gui/views/setup_view.py
  • src/github_usage/gui/wizard/setup_wizard_flow.py
  • src/github_usage/gui/wizard/setup_wizard_screen.py
  • src/github_usage/legacy_report.py
  • src/github_usage/legacy_report_data.py
  • src/github_usage/legacy_report_summary.py
  • src/github_usage/report_actions.py
  • src/github_usage/report_cache.py
  • src/github_usage/report_data.py
  • src/github_usage/report_optional.py
  • src/github_usage/report_summary.py
  • src/github_usage/setup_config.py
  • src/github_usage/storage.py
  • src/github_usage/visibility.py
  • tests/fixtures/export_report_data.json
  • tests/test_cli_parsers.py
  • tests/test_export_xlsx.py
  • tests/test_legacy_report_data.py
  • tests/test_report_actions_visibility.py
  • tests/test_report_data.py
  • tests/test_report_optional.py
  • tests/test_setup_config.py
  • tests/test_setup_wizard_visibility.py
  • tests/test_visibility.py
  • tests/test_workflow_templates.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/public-private-visibility

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kgrizz-git
kgrizz-git merged commit 5a9cc25 into main Jul 22, 2026
9 checks passed
@kgrizz-git
kgrizz-git deleted the feature/public-private-visibility branch July 22, 2026 20:10
kgrizz-git added a commit that referenced this pull request Aug 5, 2026
- gui/wizard/__init__.py: assign __all__ = [] in the except branch so
  star-imports and introspection tools don't raise AttributeError when
  Textual is not installed (HIGH #1)
- email_report_html.py: remove two no-op html.escape() calls — one on
  the already-safe storage_part format string, one on _run_out() which
  only ever returns "day {int}" or "--" (MEDIUM #3/#4)
- email_report_html.py: remove redundant outer parentheses on the
  day-of-month paragraph in the parts list (LOW #5)
- test_email_report_visibility.py: add missing edge-case test for
  pub_min > 0 with pub_mb == 0 in HTML formatter (LOW #6)
- CHANGELOG.md: document HTML workflow default change with migration
  guidance for users who re-run setup (HIGH #2)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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