GitHub
Weekly commit counts from the statistics API, or an open-issue snapshot if search returns total_count.
What you can track
Weekly commit totals for the last year: GET /repos/{owner}/{repo}/stats/commit_activity. Each element has week (unix) and total, and days (seven integers, Sunday first). Open issues and pull requests are a better snapshot from Search if you confirm total_count in test_job. The search response field was not re-fetched for this playbook; do not chart it until the preview shows it.
Credential
A fine-grained personal access token. Repository access: only the repositories you chart. The statistics page says most endpoints use Authorization: Bearer and X-GitHub-Api-Version: 2026-03-10, and that each endpoint’s page states the fine-grained permission. The statistics page itself did not name that permission. If the preview is 403 or 404, the token cannot see the repo; do not guess a permission name. Metadata read is what the members-area guide already asks for, plus Issues and Pull requests when you read those.
Host: api.github.com. Suggested name: GITHUB_TOKEN.
Where to get it
GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens. Managing personal access tokens.
tlly job
Commit activity is a JSON array. Use $ as the items path. A 202 means GitHub is computing the cache; the body is not the series. Run the job again later. Repos with 10,000 or more commits get 422 on code frequency; commit activity’s page does not say that same limit.
{"series":"commits","cron":"0 8 * * 1","request":{"url":"https://api.github.com/repos/OWNER/REPO/stats/commit_activity","headers":{"Authorization":"Bearer {{secret:GITHUB_TOKEN}}","Accept":"application/vnd.github+json","X-GitHub-Api-Version":"2026-03-10"}},"extract":{"format":"json","items":"$","date":"week","value":"total"}}
week is a unix timestamp. tlly normalises unix times to a UTC date.
Gotchas
- Statistics can answer 202 with an empty body. Treat that as “try tomorrow”, not as zero commits.
- Statistics exclude merge commits.
- tlly does not follow Link rel=next. One response is the whole series for this endpoint (a year of weeks fits).
- Rate limits: see GitHub’s rate-limit docs. This playbook does not quote a number it did not re-read. A weekly cron is enough for commit activity.
Alert ideas
Red when the latest week’s total is zero on a repo that usually moves. Open issues (once total_count is confirmed) red above a ceiling.
Verification
Checked 2026-10-26: GET /repos/{owner}/{repo}/stats/commit_activity response fields days, total, week; 202 while computing; Bearer and X-GitHub-Api-Version: 2026-03-10 on the authentication page. Fine-grained permission name for statistics is unverified. Search total_count is unverified.