Skip to content

feat: publish secure dynamic repository metrics - #3

Merged
JNHFlow21 merged 1 commit into
mainfrom
codex/secure-repository-metrics-20260810
Aug 11, 2026
Merged

feat: publish secure dynamic repository metrics#3
JNHFlow21 merged 1 commit into
mainfrom
codex/secure-repository-metrics-20260810

Conversation

@JNHFlow21

@JNHFlow21 JNHFlow21 commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the restricted Star History embed with a repository-owned white sketch-style SVG
  • refresh stars, forks, commits, visitors, cloners, and clone totals using GitHub Actions
  • publish generated output on an orphan metrics branch without embedding a long-lived token
  • add renderer and README contract tests

Validation

  • ./scripts/trove-python scripts/check.py contract
  • ./scripts/trove-python -m unittest tests.test_repository_metrics -v
  • ./scripts/trove-python scripts/privacy_scan.py .
  • actionlint .github/workflows/repository-metrics.yml
  • local live-data SVG render and visual review

@JNHFlow21
JNHFlow21 merged commit 7ed47d5 into main Aug 11, 2026
6 checks passed
@JNHFlow21
JNHFlow21 deleted the codex/secure-repository-metrics-20260810 branch August 11, 2026 03:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4c4f7e2960

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

workflow_dispatch:

permissions:
contents: write

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Stop using the contents-only token for traffic metrics

On every watch, schedule, or manual execution, this permission block restricts GITHUB_TOKEN to repository contents, but the /traffic/views and /traffic/clones calls in fetch_snapshot() require read access to the repository Administration permission. Those requests therefore return 403 Resource not accessible by integration, terminating the renderer before the SVG can be pushed to the metrics branch.

Useful? React with 👍 / 👎.



class RepositoryMetricsTests(unittest.TestCase):
def test_svg_is_white_privacy_safe_and_contains_requested_metrics(self) -> None:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Register the renderer tests in the repository checks

This new test module is not executed by any configured CI or release check: scripts/check.py runs selected named root-level suites and only performs discovery in package-specific and tests/e2e directories, so neither unit, contract, nor release loads tests.test_repository_metrics. Consequently, renderer regressions can pass every required repository check despite this test file existing; add the module to an appropriate check tier.

AGENTS.md reference: AGENTS.md:L22-L26

Useful? React with 👍 / 👎.

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