What Gets Collected
For each repository, Pawtograder stores two kinds of records:- Items — individual GitHub events with author, creation date, state, URL, and (where applicable) file-change summaries or labels. Item types are:
commitpr(pull request)issueissue_commentpr_review_comment
- Daily aggregates — per-day counts of each item type for the activity chart.
Enabling Analytics
Analytics are off by default. To turn them on:- Open the assignment configuration page (create or edit).
- Check Enable repository analytics.
- Save.
Refreshing Data
Two refresh paths exist:- Daily background refresh. A cron job runs hourly and, during the 2:00 AM UTC hour, enqueues one eligible assignment per minute (staggered to spread GitHub API load). An assignment is eligible if it is released, not archived, has
enable_repo_analytics = true, and has a due date on or after the current UTC date. Bulk fetches are batched in groups of 20 repositories and dispatched through a low-priority async queue. - Manual refresh. The Refresh button on the dashboard calls the
enqueue_repo_analytics_fetchRPC for the current repository. The fetch status panel shows the last fetched timestamp and the current state (idle,fetching,completed,error).
Manual refreshes are rate-limited to once per 10 minutes per repository. If you hit the limit, the RPC returns the time at which the next refresh is allowed.
Linking Rubric Checks to KPI Categories
Rubric checks can declare akpi_category that maps the check to one type of GitHub activity. When a check has a KPI category, the rubric sidebar shows a View [category] link that opens the Repo Analytics tab pre-filtered to the matching items.
Valid categories (defined by the repo_analytics_kpi_category enum):
kpi_category | Filters analytics to |
|---|---|
commits | Commits |
prs_opened | Pull requests |
pr_review_comments | PR review comments |
issues_opened | Issues |
issues_closed | Closed issues |
issue_comments | Issue comments |
kpi_category on a check, see the Rubrics reference.
Filtering, Expanding, and Exporting
The Items view lists every collected event with a type badge, title or commit message, author (mapped to a student profile when possible), date, and state. Expanding a commit or PR row shows the per-file additions/deletions; expanding an issue row shows its labels, assignees, and a body preview. The Activity Chart view shows a stacked daily bar chart across all tracked item types, useful for spotting late starts or pre-deadline crunches. Use the type filter buttons (or a rubric check’s KPI link) to narrow the items table. Click Export CSV to download the currently visible items, including type, GitHub ID, title, author, date, state, file-change summary, and GitHub URL.Access Control
Repo Analytics is staff-only. The underlying tables (repository_analytics_daily, repository_analytics_items, repository_analytics_fetch_status) restrict reads to graders and instructors of the class via RLS; students cannot see the tab on their own or anyone else’s submission.