GitHub Reporter is a self-hostable microservice that turns GitHub activity into automated reports using LLMs. It follows a GitOps-style architecture where your configuration (jobs.config.ts) is the single source of truth for your reporting pipeline.
Typical uses:
- Daily dev diaries summarized from your commits and PRs.
- Weekly team progress aggregated from daily reports.
- Hourly stats captured as deterministic JSON for dashboards.
- Twitter-style snippets of your shipping progress.
- GitOps Config: All jobs, schedules, and scopes are defined in
jobs.config.ts. Environment variables are for secrets and deployment defaults (e.g.GITHUB_TOKEN,GEMINI_API_KEY,GITHUB_OWNER). - One Job = One Output: Each job generates exactly one primary artifact (Markdown or JSON). This simplifies storage, logic, and rendering.
- Data Profiles: Control exactly how much context is fetched from GitHub to optimize for token usage and performance.
- Aggregation: Summarize a sequence of existing reports (e.g., Weekly Summary from 7 Daily Reports) without re-scraping GitHub.
- Clone & Setup:
pnpm install cp .env.example .env
- Configure Env: Add
GITHUB_TOKENandGEMINI_API_KEYto.env. SetGITHUB_OWNER/GITHUB_OWNER_TYPEif you want a default owner for all jobs. - Define Jobs: Edit
jobs.config.tsto set schedules, prompts, and any scope filters you need. - Run:
Run a single job by id:
pnpm dev
pnpm dev -- --job slack-daily-changelog
Manual utility for running, rerunning, deleting, listing, and stats:
pnpm reporter run --job daily-diary --at 2024-11-03
pnpm reporter rerun --job daily-diary --at 2024-11-03
pnpm reporter delete --job daily-diary --at 2024-11-03 --yesSee docs/CLI.md for the full reference.
Tip
Need help getting your tokens? Check out our Token Setup Guide for step-by-step instructions on creating GitHub and Slack credentials.
Use .env for secrets and deployment-specific settings. jobs.config.ts remains the single source of truth for job logic.
Required:
GITHUB_TOKENGEMINI_API_KEY
Owner:
GITHUB_OWNERGITHUB_OWNER_TYPE
Storage (S3/R2):
BUCKET_NAMEBUCKET_ENDPOINTBUCKET_ACCESS_KEY_IDBUCKET_SECRET_ACCESS_KEY
Notifications:
SLACK_TOKENSLACK_CHANNELSLACK_DELIVERYWEBHOOK_URLWEBHOOK_SECRET
Deployment overrides:
TIMEZONELOG_LEVELLOG_FORMAT
See .env.example for the full list and comments.
Jobs are defined using a TypeScript-native configuration. This allows for type safety and easy versioning of your reporting logic.
// jobs.config.ts
import { JobsConfig } from "./src/jobs";
export default {
jobs: [
{
id: "daily-diary",
name: "Daily Developer Diary",
mode: "pipeline",
scope: { blocklist: ["github-reporter"] },
schedule: { type: "daily", hour: 0 },
dataProfile: "standard",
promptFile: "prompts/dev-diary.txt",
},
{
id: "slack-weekly-summary",
name: "Slack Weekly Summary",
mode: "aggregate",
scope: {},
schedule: { type: "weekly", weekday: 0 },
aggregation: {
sourceJobId: "daily-diary",
maxDays: 7
},
promptFile: "prompts/slack-weekly-summary.txt",
}
]
} satisfies JobsConfig;| Profile | Description | Use Case |
|---|---|---|
minimal |
Basic repo metadata & counts. | Stats dashboards, high-level monitors. |
standard |
Metadata + Commits + README + Diff Summaries. | Most developer diaries and changelogs. |
full |
Metadata + Commits + PRs + Issues + Code Snippets. | Deep technical analysis and review reports. |
Artifacts are stored in a predictable, flat structure designed for high-performance indexing:
- Reports:
{prefix}/{ownerType}/{owner}/{jobId}/{start}__{end}/output.md(or.json) — The generated report.manifest.json— Detailed metadata and observability tags.summary.json— Lightweight stats for calendar displays.
- Index:
{prefix}/_index/{ownerType}/{owner}/{jobId}/latest.json— Pointer to the most recent run.{YYYY-MM}.json— Monthly index of all runs for timeline rendering.
GitHub Reporter supports real-time notifications via standard webhooks or a rich Slack integration.
Reports are uploaded as searchable snippets using the Slack Files API, bypassing standard message character limits.
- Create a Slack App: Go to api.slack.com/apps and create a new app.
- Add Scopes: Under OAuth & Permissions, add the
files:writebot token scope. - Install App: Install the app to your workspace and copy the Bot User OAuth Token (
xoxb-...). - Add App to Channel: Invite your bot to the desired Slack channel (
/invite @your_bot_name). - Get Channel ID: Right-click the channel name in Slack > View channel details > Copy Channel ID at the bottom.
- Configure:
Or per-job in
# .env SLACK_TOKEN=xoxb-your-token SLACK_CHANNEL=C12345678jobs.config.ts.
For Discord, custom APIs, or automation tools:
WEBHOOK_URL=https://your-webhook.com
WEBHOOK_SECRET=your-hmac-secret # OptionalValidated payloads include the x-signature header for security.
An example viewer app is provided in viewer. It is a Next.js application that provides a beautiful calendar-based interface for browsing your reports. It reads directly from your storage (Local or S3/R2) via a secure proxy.
Run it with:
pnpm viewer:devGitHub Reporter is optimized for "Fork & Deploy" on Railway:
- Deploy the repository.
- Set your
.envvariables in the Railway dashboard. - Configure an hourly CRON in Railway:
- Schedule:
0 * * * * - Command:
pnpm dev --scheduled-only
- Schedule:
The --scheduled-only flag ensures the runner only executes jobs that are currently due based on their internal schedule definition.
pnpm health: Validates your configuration, storage carrier access, and GitHub token scopes.pnpm smoke: Simulates a run to check schedules and API connectivity without writing artifacts.
License: MIT