A val that automatically fetches GitHub commits from multiple repositories and posts formatted changelog updates to Discord. It categorizes commits based on conventional commit messages ie. feat:
, fix:
etc., and uses AI to generate user-friendly summaries.
Example:
The repositories to monitor are configured directly in the code in process-commits.tsx
. Update the REPOS
array to add or modify repositories:
const REPOS = [
{ owner: "steel-dev", name: "steel-browser", branch: "main" },
{ owner: "steel-dev", name: "steel-api", branch: "develop" },
{ owner: "steel-dev", name: "steel-docs", branch: "main" },
];
Each repo configuration includes:
owner
: GitHub repository owner/organizationname
: Repository namebranch
: Specific branch to monitor (e.g., "main", "develop", "staging")Before you can run the cron or try out the playground, you must add the following Environment Variables (via left sidebar of this val):
GITHUB_TOKEN
:
repo
scopeContents
. You will need approval from the org admin.DISCORD_WEBHOOK_URL
: In your Discord server → Server Settings → Integrations → Webhooks → New Webhook → Copy Webhook URLgh-to-discord.tsx
is a cron that runs automatically based on your configured schedule, fetching commits since the last run
playground.tsx
You can also manually test this val using the playground.tsx
HTTP endpoint.
Here's an Example Playground with the steel
repo.
[repo-name] commit message
The bot automatically categorizes commits into the following sections (feel free to add more!):
feat:
)fix:
)chore:
)Each commit message is processed by GPT to generate a more user-friendly message.
You can modify the GPT prompt in the generateUserFocusedSummary()
function in process-commits.tsx
. You can paste in examples of past changelogs to help the LLM understand your desired tone.