Integrations
GitHub and Linear adapters for consensus workflows.
Overview
@consensus-tools/integrations provides GitHub and Linear adapters for consensus-tools. Fetch PR data via the gh CLI, verify webhook signatures, and manage Linear tasks — primarily used by workflow templates.
Installation
Prerequisites:
- GitHub: The
ghCLI must be installed and authenticated (gh auth login). - Linear: Install
@linear/sdkas a peer dependency (pnpm add @linear/sdk).
Quick start
GitHub — fetch pull requests
GitHub — verify webhook signatures
Linear — task management
Exports reference
| Export | Kind | Description |
|---|---|---|
fetchPullRequest | Function | (repo, prNumber) => PullRequest -- uses gh CLI |
listOpenPullRequests | Function | (repo, limit?) => Array<{ number, title, author }> |
verifyWebhookSignature | Function | (payload, signature, secret) => boolean -- HMAC-SHA256 |
PullRequest | Type | { number, title, author, url, diff, files } |
createLinearClient | Function | (apiKey) => Promise<LinearClient> |
LinearClient | Type | Interface with getUnassignedTasks, getTeamMembers, createSubtask, assignTask |
LinearTask | Type | { id, title, state, assigneeId, teamId } |
LinearTeamMember | Type | { id, name, email } |
Related
- workflows -- PR Merge Guard and Linear templates use these adapters
- notifications -- companion package for HITL dispatch