Daily metrics

Collects daily project stats — lines of code, PRs, commits, issues, test coverage, CI pass rate, autonomous percentage — and commits a JSON snapshot to the repo.

Requires: GitHub. Set up integrations

How to use this template

  1. 1Click "Use this template" or create a new automation in Ona
  2. 2Set your trigger (manual, scheduled, or event-based)
  3. 3Copy each step below into the automation builder
  4. 4Customize the prompts for your specific use case

What this does

  • Strict schema for time-series analysis
  • Tracks autonomous vs human contribution split
  • Powers dashboards and weekly recaps
  • All data version-controlled in the repo

Workflow

Trigger

Scheduled run

Runs daily at 9 AM UTC.

Shell Script

Collect stats

cloc src/ — count LoC. gh pr list --state merged. git rev-list --count HEAD. pnpm test --coverage. gh issue list with label filters.
Prompt

Build snapshot

Produce metrics/daily/YYYY-MM-DD.json matching the schema (date, loc, files, prs, commits, test_coverage_pct, ci_pass_rate_pct, autonomous_pct, issues by status).

Pull Request

Commit snapshot

Open a PR adding the new daily JSON file.

More automations to explore.

Ready to try a template?

Start building with a free Ona account.

Copied to clipboard!

This website uses cookies to enhance the user experience. Read our cookie policy for more info.