-
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). -
GitHub Repository Owner and Repository Name (as separate environment variables).
-
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).
-
Configure
Set environment variables:
Key | Example value |
---|---|
GITHUB_TOKEN | ghp_xxx |
Configure val (see config.ts or use environment variables)
Key | Example value |
---|---|
GITHUB_REPO_OWNER | octo-org |
GITHUB_REPO_NAME | 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.
- Calls
github-api
to fetch issues/PRs updated since the last run (it handles tracking the last execution time internally). - 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