Skip to content

Track cumulative clones: preserve history and add total_count with updated badge#72

Merged
Sendipad merged 2 commits intodevelopfrom
codex/fix-total-clone-count
Mar 3, 2026
Merged

Track cumulative clones: preserve history and add total_count with updated badge#72
Sendipad merged 2 commits intodevelopfrom
codex/fix-total-clone-count

Conversation

@Sendipad
Copy link
Copy Markdown
Owner

@Sendipad Sendipad commented Mar 3, 2026

Motivation

  • The clone badge and published stats only reflected GitHub’s 14-day rolling window, so the repository lacked a durable cumulative clone total.
  • Preserve historical daily snapshots so an all-time running total can be computed and displayed permanently.

Description

  • Updated .github/workflows/clone-stats.yml to restore stats/clone_history.json from the stats branch when present, merge it with the fresh traffic.clones payload, deduplicate by timestamp, and compute a cumulative total_count using jq.
  • The workflow now writes stats/clone_history.json and publishes stats/clones.json with fields count, uniques, and the new total_count field.
  • Added stats/clone_history.json to the files staged by the workflow and updated stats/README.md to document the new artifacts and total_count semantics.
  • Updated the top-level README.md badge to query total_count (all-time) instead of the 14-day count.

Testing

  • Inspected the resulting workflow and files with nl -ba .github/workflows/clone-stats.yml, nl -ba README.md, and nl -ba stats/README.md to confirm the intended changes were present.
  • Ran git diff --check and git status --short to validate the working tree state, both of which completed without error.
  • Attempted to parse the workflow YAML with a small Python script using PyYAML which failed because the environment lacked the PyYAML package, so YAML parsing could not be executed here.

Codex Task

@Sendipad Sendipad merged commit 4e48f13 into develop Mar 3, 2026
6 checks passed
@Sendipad Sendipad deleted the codex/fix-total-clone-count branch March 3, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant