| 1 | -- Commits people pushed, for the contribution calendar on their profile |
| 2 | -- (src/push_commits.rs). One row per person, repository and UTC day: how |
| 3 | -- many pushes landed on the default branch (or gh-pages) and how many new |
| 4 | -- commits they brought along its first-parent line, at most 50 a push. |
| 5 | -- Credited to whoever pushed, as a person; tokens of agents, workspaces and |
| 6 | -- workflow jobs are not counted. Work's `contributions` reads it through |
| 7 | -- `commit_days`, which counts only repositories the viewer may read. |
| 8 | CREATE TABLE push_commits ( |
| 9 | user_id TEXT NOT NULL, |
| 10 | repo_id TEXT NOT NULL, |
| 11 | -- YYYY-MM-DD, UTC. |
| 12 | day TEXT NOT NULL, |
| 13 | pushes INTEGER NOT NULL DEFAULT 0, |
| 14 | commits INTEGER NOT NULL DEFAULT 0, |
| 15 | PRIMARY KEY (user_id, day, repo_id) |
| 16 | ); |