GitHub
Turn a failed CI run into an agent investigation, routed to your chat.
GitHub is an event source, not a chat surface. When a workflow run fails, memcode turns it into an agent task and routes the result to a chat conversation you choose. This needs a chat channel set up first, since that is where the result is posted.
Step 1: Choose a reply destination
Pick a chat conversation to receive results, written as channel:conversation,
for example telegram:123456789. Set up that channel first from its own page.
Step 2: Add a webhook
In your repository, open Settings > Webhooks > Add webhook:
- Payload URL: your gateway's public address plus
/webhook/github. - Content type:
application/json. - Secret: a random string you will also give memcode.
- Events: select individual events and check Workflow runs.
The gateway serves webhooks on :8787 by default. In local development, expose
that port over HTTPS with a tunnel and use the tunnel URL as the payload URL.
Step 3: Configure
memcode gateway setupChoose github, paste the webhook secret, and set the reply destination from
Step 1. The secret is written to your global .env as GITHUB_WEBHOOK_SECRET;
the reply route is written to gateway.yaml as channels.github.reply_to.
Step 4: Run
memcode gatewayWhen a workflow run fails, the gateway posts the investigation to your chat.
Every delivery is checked against your webhook secret, and a retried delivery
is recognized and does not run twice. Memcode's own bot and
memcode/* branches are ignored, so a fix run cannot trigger itself.