Skip to main content

Your GitHub clone stats, visualized and celebrated.

Project description

ClonePulse

Your GitHub clone stats, visualized and celebrated.
Track weekly trends, highlight milestones, and share visual dashboards—all automatically.

Use this template
Tests


Add Badges to Your README

ClonePulse can generate badges you can embed in your repo:

# clones
Milestone


Example dashboards

Weekly dashboard (default)

A weekly clone activity chart is automatically updated and saved in clonepulse/weekly_clones.png.

  • Runs every Monday morning
  • Discards partial weeks
  • Shows only complete Monday–Sunday periods

Standard clone dashboard, last 12 weeks

Reproducible window (--start + --weeks)

Dashboard starting 2025-08-15 for 6 weeks
Command: python src/clonepulse/generate_clone_dashboard.py --start 2025-08-15 --weeks 6

Calendar year (--year)

Dashboard for calendar year 2025 (to date)
Command: python src/clonepulse/generate_clone_dashboard.py --year 2025


Quick Setup

  1. Create a GitHub Token
    See 🔐 Token Setup below.

  2. Drop essentials into your repo
    Copy the contents of clonepulse/ and src/clonepulse/ plus the workflows in .github/workflows/.

  3. Add badges to your README
    Replace your-username/your-repo:

    [![# clones](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/your-username/your-repo/main/clonepulse/badge_clones.json)](https://github.com/your-username/your-repo/blob/main/clonepulse/weekly_clones.png)
    
    [![Milestone](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/your-username/your-repo/main/clonepulse/milestone_badge.json)](https://github.com/your-username/your-repo/blob/main/clonepulse/weekly_clones.png)
    
  4. Configure the workflow
    Update fetch_clones.yml with your --user and --repo.

    - name: Run fetch_clones.py
      env:
        TOKEN: ${{ secrets.CLONEPULSE_METRICS }}
      run: |
        PYTHONPATH=src python src/clonepulse/fetch_clones.py \
          --user <your GitHub login> \
          --repo <your repo>
    
  5. Generate the dashboard in your workflow

    Default (last 12 weeks):

    - name: Render dashboard
      run: PYTHONPATH=src python src/clonepulse/generate_clone_dashboard.py
    

    Reproducible window:

    - name: Render dashboard
      run: |
        PYTHONPATH=src python src/clonepulse/generate_clone_dashboard.py \
          --start 2025-06-02 --weeks 8
    

    Dashboard title & repo label

    • Banner title always says “Weekly Clone Metrics”.
    • If you provide --user and --repo, the banner also shows user/repo.
    • If only one is provided, that single value is shown.
    • If neither flag is passed, the script falls back to env vars GITHUB_USER / GITHUB_REPO for the label.

    Additional CLI options (can also be used locally):

    PYTHONPATH=src python src/clonepulse/generate_clone_dashboard.py \
      [--user your-username] \
      [--repo your-repo] \
      [--start YYYY-MM-DD --weeks N] \
      [--year YYYY]
    

Token Setup

ClonePulse fetches traffic stats from the GitHub API. This requires a Personal Access Token (PAT).

Permissions

For public repos:

  • Administration: Read-only
  • Metadata: Read-only

For private repos:

  • Administration: Read-only
  • Metadata: Read-only
  • Contents: Read-only
  • Traffic: Read-only

How to Create the Token

  1. Visit https://github.com/settings/tokens
    Click Generate new token → Fine-grained token

  2. Configure:

    • Name: e.g. your-repo_ClonePulse
    • Expiration: e.g. 90 days
    • Resource owner: Your user or organization
    • Repository access: select your repo
    • Permissions: set as above
  3. Generate and copy the token. (You only see it once.)

Add Token to Secrets

  1. Go to your GitHub repository:
    Settings → Secrets and variables → Actions → New repository secret

  2. Name the secret:
    CLONEPULSE_METRICS

  3. Paste the token and save.

Use in Workflow

- name: Run fetch_clones.py
  env:
    TOKEN: ${{ secrets.CLONEPULSE_METRICS }}
  run: python src/clonepulse/fetch_clones.py

Contributing

Found a bug or want to suggest a feature?
Open an issue or send a PR.


License

ClonePulse is licensed under MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clonepulse-1.0.5.tar.gz (111.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clonepulse-1.0.5-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file clonepulse-1.0.5.tar.gz.

File metadata

  • Download URL: clonepulse-1.0.5.tar.gz
  • Upload date:
  • Size: 111.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for clonepulse-1.0.5.tar.gz
Algorithm Hash digest
SHA256 2b12868baefb704f8ab3a5232a9271b360e982b53b88e11bd20ac6dfa5dd9de5
MD5 a5d85c5ba39b795d18b70d2b8e7cf57b
BLAKE2b-256 6460c421cef2fd5047042c4a3f8f8e7b54e89461ee535f3f895a33a6c49eaacc

See more details on using hashes here.

File details

Details for the file clonepulse-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: clonepulse-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for clonepulse-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9612edd10d35a00a48a03cf4ef8079fc730f4c4d392d4a2e58f1a5aef44ba207
MD5 8c34fa3c74966b66fdbddde2b1c3d6da
BLAKE2b-256 860c6f22ada0548d018ddcdc44026d958b50b61299b44f70f16371961013b905

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page