-
Tracks issues or pull‑requests updated in a chosen GitHub repository since the last run.
-
Sends the resulting metric (count, effort estimate, etc.) to a Beeminder goal.
-
Runs on a Val Town schedule---no servers, no cron on your laptop.
It relies on two helper vals:
| Val | Purpose |
| github-api
| Wrapper around GitHub's REST API with a helper for updated issues. |
| beeminder-client
| Lightweight Beeminder v1 API client for goal and datapoint operations. |
-
A Val Town account with Cron permissions.
-
GitHub Personal Access Token (
repo:read
scope). -
Beeminder API Token (under Account → Settings on beeminder.com).
-
An existing Beeminder goal to receive datapoints.
-
Copy this val into your own namespace (press Copy in Val Town).
-
Add secrets in Account → Secrets:
| Key | Example value | |
GITHUB_TOKEN
|ghp_xxx
| |GITHUB_REPO
|octo-org/monorepo
| |BEEMINDER_USERNAME
|alice
| |BEEMINDER_TOKEN
|abcd1234efgh
| |BEEMINDER_GOAL
|issues
| -
Schedule it: in the editor choose Schedule → Cron and enter an expression such as
0 * * * *
for hourly runs. The val remembers its last execution so double‑counting is avoided.
-
Reads
meta.lastRunAt
(provided by Val Town) to get the previous run time. -
Calls
github-api
to fetch issues/PRs updated since then. -
Calculates a datapoint (default: count) and crafts a summary comment.
-
Posts the datapoint to your Beeminder goal via
beeminder-client
. -
Logs every step to Val Town's console.
-
Filtering: modify the GitHub query to restrict by label, assignee, or PR/issue type.
-
Scoring: change the datapoint value (e.g. story‑points, PR size).
-
Multiple goals: call the Beeminder client multiple times to split metrics.
| Problem | Fix |
| 401 Unauthorized
from GitHub | Check GITHUB_TOKEN
and scopes. |
| No datapoints appear | Verify BEEMINDER_GOAL
slug and wait for the cron run. |
| Duplicate datapoints | Cron schedule too tight---use hourly or daily. |
MIT