- Replace "βοΈ Issue #44 already sent today, skipping" check with "already sent at {last_modified_at}"
See Beeminder's blog post on rolodex goals for more context!
This val helps you automate that.
-
TracksΒ issues or pullβrequests updated in a chosen GitHub repository since the last run.
-
SendsΒ a datapoint 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 |
You can either set these as environment variables, or manage them in config.ts.
- Schedule it: Schedule a val.town CRON trigger.
- Calls
github-apito fetch issues/PRs updated since the last run (it handles tracking the last execution time internally). - For each updated issue/PR, crafts a summary comment and sends a +1 datapoint to your Beeminder goal, with the correct (seconds) timestamp.