GitHub Integration
GitHub API integration for issues and pull requests.
Configuration
json
{
"credentials": {
"github": {
"token": "{{env.GITHUB_TOKEN}}"
}
}
}Endpoints
Issues
| Method | Endpoint | Description |
|---|---|---|
| GET | /integrations/github/repos/:owner/:repo/issues | List issues |
| GET | /integrations/github/repos/:owner/:repo/issues/:number | Get issue |
| POST | /integrations/github/repos/:owner/:repo/issues | Create issue |
| PATCH | /integrations/github/repos/:owner/:repo/issues/:number | Update issue |
Pull Requests
| Method | Endpoint | Description |
|---|---|---|
| GET | /integrations/github/repos/:owner/:repo/pulls | List PRs |
| GET | /integrations/github/repos/:owner/:repo/pulls/:number | Get PR |
| POST | /integrations/github/repos/:owner/:repo/pulls | Create PR |
Actions (for workflows)
getIssue
json
{
"integration": "github",
"action": "getIssue",
"params": {
"owner": "owner",
"repo": "repo",
"issueNumber": 123
}
}createIssue
json
{
"integration": "github",
"action": "createIssue",
"params": {
"owner": "owner",
"repo": "repo",
"title": "Bug report",
"body": "Description...",
"labels": ["bug"]
}
}listIssues
json
{
"integration": "github",
"action": "listIssues",
"params": {
"owner": "owner",
"repo": "repo",
"state": "open",
"labels": "bug"
}
}createPullRequest
json
{
"integration": "github",
"action": "createPullRequest",
"params": {
"owner": "owner",
"repo": "repo",
"title": "Feature: Add login",
"head": "feature-branch",
"base": "main",
"body": "Description..."
}
}Examples
List Issues
bash
curl http://localhost:3000/integrations/github/repos/owner/repo/issues \
-H "Authorization: Bearer <token>"Create Issue
bash
curl -X POST http://localhost:3000/integrations/github/repos/owner/repo/issues \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"title": "Bug: Login fails",
"body": "Steps to reproduce...",
"labels": ["bug", "priority-high"]
}'Webhook Receiver
Receive GitHub webhooks:
json
{
"webhooks": [{
"name": "github-events",
"path": "/webhooks/github",
"provider": "github",
"secret": "{{env.GITHUB_WEBHOOK_SECRET}}",
"actions": [{
"type": "slack",
"action": "sendMessage",
"params": {
"text": "GitHub: {{payload.action}} on {{payload.repository.name}}"
}
}]
}]
}