| 1 | { |
| 2 | "schema": 1, |
| 3 | "id": "linear", |
| 4 | "name": "Linear", |
| 5 | "category": "development", |
| 6 | "auth": { |
| 7 | "kind": "both", |
| 8 | "base": "https://api.linear.app", |
| 9 | "authorization": "none", |
| 10 | "pat_help": "https://linear.app/settings/account/security — create a personal API key under Security & access; the key acts as your Linear account, so keep the connection read-only unless you want issue creation", |
| 11 | "oauth": { |
| 12 | "authorize_url": "https://linear.app/oauth/authorize", |
| 13 | "token_url": "https://api.linear.app/oauth/token", |
| 14 | "scopes": ["read"], |
| 15 | "scopes_write": ["read", "issues:create"] |
| 16 | } |
| 17 | }, |
| 18 | "ops": [ |
| 19 | { |
| 20 | "id": "viewer", |
| 21 | "label": "Check who the key belongs to", |
| 22 | "access": "read", |
| 23 | "method": "POST", |
| 24 | "path": "/graphql", |
| 25 | "body_json": { |
| 26 | "query": "query { viewer { name displayName email url } }" |
| 27 | }, |
| 28 | "pick": { |
| 29 | "root": "data.viewer", |
| 30 | "fields": [ |
| 31 | "name", |
| 32 | "displayName", |
| 33 | "email", |
| 34 | "url" |
| 35 | ] |
| 36 | } |
| 37 | }, |
| 38 | { |
| 39 | "id": "teams.list", |
| 40 | "label": "List your teams", |
| 41 | "access": "read", |
| 42 | "method": "POST", |
| 43 | "path": "/graphql", |
| 44 | "body_json": { |
| 45 | "query": "query { teams(first: 50) { nodes { id key name } } }" |
| 46 | }, |
| 47 | "pick": { |
| 48 | "root": "data.teams.nodes", |
| 49 | "fields": [ |
| 50 | "id", |
| 51 | "key", |
| 52 | "name" |
| 53 | ] |
| 54 | } |
| 55 | }, |
| 56 | { |
| 57 | "id": "issues.list", |
| 58 | "label": "List a team's active issues", |
| 59 | "access": "read", |
| 60 | "method": "POST", |
| 61 | "path": "/graphql", |
| 62 | "args": { |
| 63 | "team": { |
| 64 | "required": true |
| 65 | } |
| 66 | }, |
| 67 | "body_json": { |
| 68 | "query": "query($team: String!) { issues(first: 50, filter: { team: { key: { eq: $team } }, state: { type: { nin: [\"completed\", \"canceled\"] } } }, orderBy: updatedAt) { nodes { identifier title url priorityLabel updatedAt state { name } assignee { displayName } } } }", |
| 69 | "variables": { |
| 70 | "team": "{team}" |
| 71 | } |
| 72 | }, |
| 73 | "pick": { |
| 74 | "root": "data.issues.nodes", |
| 75 | "fields": [ |
| 76 | "identifier", |
| 77 | "title", |
| 78 | "url", |
| 79 | "priorityLabel", |
| 80 | "updatedAt", |
| 81 | "state.name", |
| 82 | "assignee.displayName" |
| 83 | ] |
| 84 | } |
| 85 | }, |
| 86 | { |
| 87 | "id": "issue.create", |
| 88 | "label": "Create an issue", |
| 89 | "access": "write", |
| 90 | "method": "POST", |
| 91 | "path": "/graphql", |
| 92 | "args": { |
| 93 | "team_id": { |
| 94 | "required": true |
| 95 | }, |
| 96 | "title": { |
| 97 | "required": true |
| 98 | }, |
| 99 | "description": {} |
| 100 | }, |
| 101 | "body_json": { |
| 102 | "query": "mutation($teamId: String!, $title: String!, $description: String) { issueCreate(input: { teamId: $teamId, title: $title, description: $description }) { issue { identifier title url } } }", |
| 103 | "variables": { |
| 104 | "teamId": "{team_id}", |
| 105 | "title": "{title}", |
| 106 | "description": "{description}" |
| 107 | } |
| 108 | }, |
| 109 | "pick": { |
| 110 | "root": "data.issueCreate.issue", |
| 111 | "fields": [ |
| 112 | "identifier", |
| 113 | "title", |
| 114 | "url" |
| 115 | ] |
| 116 | }, |
| 117 | "confirm": "Create the Linear issue “{title}” in the team with id {team_id}?" |
| 118 | } |
| 119 | ] |
| 120 | } |
| 121 | |