GitHub Connector
Use LoopCLI to enforce repo hygiene, publish releases, and respond to events from GitHub.
Required secrets
| Vault key | Description |
|---|---|
github-token |
Personal access token or GitHub App token with required scopes. |
Recommended scopes: repo, workflow, and admin:repo_hook if you manage webhooks automatically.
loopcli secret add github-token --value ghp_...
Common automations
- Update pull request labels or statuses after CI completes.
- Mirror issues into Linear or Jira.
- Generate release notes and publish GitHub Releases.
Example loop
name: github-release-notes
description: Draft GitHub release notes with Claude.
steps:
- id: fetch
name: Fetch merged PRs
type: http
config:
url: https://api.github.com/repos/{{env:GITHUB_REPO}}/pulls?state=closed&per_page=50
method: GET
headers:
Authorization: "Bearer {{secret:github-token}}"
Accept: application/vnd.github+json
- id: summarize
name: Summarize changes
type: http
config:
url: https://api.anthropic.com/v1/messages
method: POST
headers:
Authorization: "Bearer {{secret:anthropic-api-key}}"
Content-Type: application/json
body:
model: claude-3-sonnet
max_tokens: 600
messages:
- role: user
content: "Create release notes for these PRs:\n{{steps.fetch.response.body}}"
- id: create
name: Publish release
type: http
config:
url: https://api.github.com/repos/{{env:GITHUB_REPO}}/releases
method: POST
headers:
Authorization: "Bearer {{secret:github-token}}"
Accept: application/vnd.github+json
body:
tag_name: "{{env:RELEASE_TAG}}"
name: "{{env:RELEASE_NAME}}"
body: "{{steps.summarize.response.body.content[0].text}}"
Webhooks + LoopCLI
For GitHub webhooks, validate the signature with the same token:
import crypto from 'node:crypto'
const signature = `sha256=${crypto
.createHmac('sha256', process.env.GITHUB_WEBHOOK_SECRET!)
.update(payload)
.digest('hex')}`
Forward the verified payload to loopcli loop run github-webhook --payload payload.json.