linear-ci-integration
Integrate Linear with GitHub Actions CI/CD pipelines. Use when setting up automated testing, PR-to-issue linking, or creating Linear issues from CI failures. Trigger: "linear CI", "linear GitHub Actions", "linear CI/CD", "linear automated tests", "linear PR integration".
What this skill does
# Linear CI Integration
## Overview
Integrate Linear into GitHub Actions CI/CD pipelines: run integration tests against the Linear API, automatically link PRs to issues, transition issue states on PR events, and create Linear issues from build failures.
## Prerequisites
- GitHub repository with Actions enabled
- Linear API key stored as GitHub secret
- npm/pnpm project with `@linear/sdk` configured
## Instructions
### Step 1: Store Secrets in GitHub
```bash
# Using GitHub CLI
gh secret set LINEAR_API_KEY --body "lin_api_xxxxxxxxxxxx"
gh secret set LINEAR_WEBHOOK_SECRET --body "whsec_xxxxxxxxxxxx"
# Store team ID for CI-created issues
gh variable set LINEAR_TEAM_ID --body "team-uuid-here"
```
### Step 2: Integration Test Workflow
```yaml
# .github/workflows/linear-tests.yml
name: Linear Integration Tests
on:
push:
branches: [main]
pull_request:
env:
LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run test:linear
env:
LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: test-results/
```
### Step 3: Integration Test Suite
```typescript
// tests/linear.integration.test.ts
import { describe, it, expect, beforeAll, afterAll } from "vitest";
import { LinearClient } from "@linear/sdk";
describe("Linear Integration", () => {
let client: LinearClient;
let teamId: string;
const cleanup: string[] = [];
beforeAll(async () => {
const apiKey = process.env.LINEAR_API_KEY;
if (!apiKey) throw new Error("LINEAR_API_KEY required for integration tests");
client = new LinearClient({ apiKey });
const teams = await client.teams();
teamId = teams.nodes[0].id;
});
afterAll(async () => {
for (const id of cleanup) {
try { await client.deleteIssue(id); } catch {}
}
});
it("authenticates successfully", async () => {
const viewer = await client.viewer;
expect(viewer.name).toBeDefined();
expect(viewer.email).toBeDefined();
});
it("creates an issue", async () => {
const result = await client.createIssue({
teamId,
title: `[CI] ${new Date().toISOString()}`,
description: "Created by CI pipeline",
});
expect(result.success).toBe(true);
const issue = await result.issue;
expect(issue?.identifier).toBeDefined();
if (issue) cleanup.push(issue.id);
});
it("queries issues with filtering", async () => {
const issues = await client.issues({
first: 10,
filter: { team: { id: { eq: teamId } } },
});
expect(issues.nodes.length).toBeGreaterThan(0);
});
it("lists workflow states", async () => {
const teams = await client.teams();
const states = await teams.nodes[0].states();
expect(states.nodes.length).toBeGreaterThan(0);
expect(states.nodes.some(s => s.type === "completed")).toBe(true);
});
});
```
### Step 4: PR-to-Issue Linking Workflow
Automatically update Linear issues when PRs are opened, merged, or closed. Extracts issue identifiers from branch names (e.g., `feature/ENG-123-description`).
```yaml
# .github/workflows/linear-pr-sync.yml
name: Sync PR to Linear
on:
pull_request:
types: [opened, closed]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- name: Extract Linear issue ID from branch
id: extract
run: |
BRANCH="${{ github.head_ref }}"
ISSUE_ID=$(echo "$BRANCH" | grep -oE '[A-Z]+-[0-9]+' | head -1 || true)
echo "issue_id=$ISSUE_ID" >> $GITHUB_OUTPUT
- name: Update Linear issue
if: steps.extract.outputs.issue_id
env:
LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }}
run: |
npx tsx scripts/sync-pr-to-linear.ts \
--issue "${{ steps.extract.outputs.issue_id }}" \
--pr "${{ github.event.pull_request.number }}" \
--action "${{ github.event.action }}" \
--merged "${{ github.event.pull_request.merged }}"
```
### Step 5: PR Sync Script
```typescript
// scripts/sync-pr-to-linear.ts
import { LinearClient } from "@linear/sdk";
import { parseArgs } from "util";
const { values } = parseArgs({
options: {
issue: { type: "string" },
pr: { type: "string" },
action: { type: "string" },
merged: { type: "string" },
},
});
async function main() {
const client = new LinearClient({ apiKey: process.env.LINEAR_API_KEY! });
// Find issue by identifier search
const results = await client.issueSearch(values.issue!);
const issue = results.nodes[0];
if (!issue) {
console.log(`Issue ${values.issue} not found — skipping`);
return;
}
const prUrl = `https://github.com/${process.env.GITHUB_REPOSITORY}/pull/${values.pr}`;
// Add comment linking to PR
await client.createComment({
issueId: issue.id,
body: `PR #${values.pr} ${values.action}: View PR`,
});
// Transition state based on PR action
const team = await issue.team;
const states = await team!.states();
if (values.action === "opened") {
const reviewState = states.nodes.find(s =>
s.name.toLowerCase().includes("review") || s.name.toLowerCase().includes("in progress")
);
if (reviewState) await client.updateIssue(issue.id, { stateId: reviewState.id });
} else if (values.action === "closed" && values.merged === "true") {
const doneState = states.nodes.find(s => s.type === "completed");
if (doneState) await client.updateIssue(issue.id, { stateId: doneState.id });
}
console.log(`Updated ${values.issue} for PR #${values.pr} (${values.action})`);
}
main().catch(console.error);
```
### Step 6: Create Issue on CI Failure
```yaml
# .github/workflows/issue-on-failure.yml
name: Create Linear Issue on Failure
on:
workflow_run:
workflows: ["CI"]
types: [completed]
jobs:
create-issue:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- name: Create Linear issue for build failure
env:
LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }}
run: |
curl -s -X POST https://api.linear.app/graphql \
-H "Authorization: $LINEAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation($input: IssueCreateInput!) { issueCreate(input: $input) { success issue { identifier url } } }",
"variables": {
"input": {
"teamId": "${{ vars.LINEAR_TEAM_ID }}",
"title": "[CI] Build failure: ${{ github.event.workflow_run.head_branch }}",
"description": "Build failed on branch `${{ github.event.workflow_run.head_branch }}`.\n\nView run",
"priority": 1
}
}
}'
```
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `Secret not found` | Missing GitHub secret | Add `LINEAR_API_KEY` to repo Settings > Secrets > Actions |
| Issue not found | Wrong identifier or workspace | Verify branch naming convention matches team key |
| `Permission denied` | API key lacks write scope | Regenerate key with write access |
| Duplicate CI issues | Failure workflow runs repeatedly | Add deduplication check before creating |
## Examples
### PR Template for Linear Integration
```markdown
<!-- .github/PULL_REQUEST_TEMPLATE.md -->
## Linear Issue
<!-- Use magic words: Fixes, Closes, Resolves -->
Fixes ENG-XXX
## Changes
-
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
```
## Resources
- [GitHub Actions Documentation](https://docsRelated in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.