{"_id":"@airnauts/airside-extension-github","name":"@airnauts/airside-extension-github","dist-tags":{"latest":"0.10.1"},"versions":{"0.10.1":{"name":"@airnauts/airside-extension-github","version":"0.10.1","description":"Create GitHub issues from comment threads (server extension).","keywords":["comments","commenting","annotations","feedback","airnauts","integration","github"],"license":"MIT","author":{"name":"Airnauts"},"homepage":"https://github.com/Airnauts/airside#readme","repository":{"type":"git","url":"git+https://github.com/Airnauts/airside.git","directory":"packages/integration-github"},"bugs":{"url":"https://github.com/Airnauts/airside/issues"},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"publishConfig":{"access":"public"},"dependencies":{"@airnauts/airside-core":"^0.10.1","@airnauts/airside-server":"^0.10.1"},"devDependencies":{"@airnauts/airside-test-support":"0.0.0"},"scripts":{"build":"tsup && tsc --build --force","typecheck":"tsc --build","test":"vitest run"},"_id":"@airnauts/airside-extension-github@0.10.1","_integrity":"sha512-CT8KqsIzJDN88a7xQECGFoInFj6pYEZxUuQkjdTJywk8DBXNoh5yD0rq/ni2BDqcutiqHIqxVPOjyIj55Acz+w==","_resolved":"/tmp/6aa2dff8e679fafa646f98c79ffb76ef/airnauts-airside-extension-github-0.10.1.tgz","_from":"file:airnauts-airside-extension-github-0.10.1.tgz","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-CT8KqsIzJDN88a7xQECGFoInFj6pYEZxUuQkjdTJywk8DBXNoh5yD0rq/ni2BDqcutiqHIqxVPOjyIj55Acz+w==","shasum":"c5b34fba798328b4e33cbd8a507f7daffeb78ba2","tarball":"https://registry.npmjs.org/@airnauts/airside-extension-github/-/airside-extension-github-0.10.1.tgz","fileCount":13,"unpackedSize":28617,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD0chJtKQcKjcPVRiFTcXhE4E2E7iAvUK4gc6KuoiW+ggIhAIagFyS2gRqPBCc0aGxLaDNfjuOkP2dfEfJn9EtMrXlK"}]},"_npmUser":{"name":"mateuszpaulski","email":"mateusz@airnauts.com"},"directories":{},"maintainers":[{"name":"jkrzemie","email":"hello@airnauts.com"},{"name":"mateuszpaulski","email":"mateusz@airnauts.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/airside-extension-github_0.10.1_1783066934715_0.36463166929933233"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-03T08:22:14.548Z","0.10.1":"2026-07-03T08:22:14.884Z","modified":"2026-07-03T08:22:15.114Z"},"maintainers":[{"name":"jkrzemie","email":"hello@airnauts.com"},{"name":"mateuszpaulski","email":"mateusz@airnauts.com"}],"description":"Create GitHub issues from comment threads (server extension).","homepage":"https://github.com/Airnauts/airside#readme","keywords":["comments","commenting","annotations","feedback","airnauts","integration","github"],"repository":{"type":"git","url":"git+https://github.com/Airnauts/airside.git","directory":"packages/integration-github"},"author":{"name":"Airnauts"},"bugs":{"url":"https://github.com/Airnauts/airside/issues"},"license":"MIT","readme":"<p align=\"center\">\n  <a href=\"https://github.com/Airnauts/airside\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Airnauts/airside/main/assets/airside-logo-dark.svg\">\n      <img src=\"https://raw.githubusercontent.com/Airnauts/airside/main/assets/airside-logo-light.svg\" alt=\"Airside\" height=\"40\">\n    </picture>\n  </a>\n  <h1 align=\"center\">\nEmbeddable Commenting Tool\n</h1>\n</p>\n\n# @airnauts/airside-extension-github\n\nGitHub Issues thread-action extension for the [Airside](https://github.com/Airnauts/airside) server. Adds a **\"Create GitHub issue\"** button to each comment thread; clicking it opens a GitHub issue pre-filled with the thread content and stores the issue link back on the thread.\n\n## Installation\n\n```bash\npnpm add @airnauts/airside-extension-github\n```\n\n## Quick start\n\n```ts\nimport { createAirsideServer } from '@airnauts/airside-server'\nimport { githubExtension } from '@airnauts/airside-extension-github'\n\ncreateAirsideServer({\n  repository,\n  storage,\n  secretKey: process.env.AIRSIDE_SECRET!,\n  projectId: 'my-app',\n  allowedOrigins: ['https://my-app.example.com'],\n  extensions: githubExtension({\n    token: process.env.AIRSIDE_GITHUB_TOKEN!,\n    owner: 'your-org',\n    repo: 'your-repo',\n  }),\n})\n```\n\nThe action appears in the thread toolbar. Once a GitHub issue has been created for a thread, the button hides itself — so repeated presses create only one issue. The issue URL is stored as an `externalLink` on the thread and shown in the UI.\n\n## Authentication\n\nAuthenticate with a **fine-grained personal access token** (PAT) scoped to the single target repository with **Issues: write** — least privilege for v1. The token is sent as `authorization: Bearer <token>`.\n\nThat same `Bearer` header also accepts a **GitHub App installation token** a host mints itself, so moving to App-based auth later is a host concern with **no configuration change** here (ADR-0049).\n\n## API reference\n\n### `githubExtension(opts)`\n\n```ts\ngithubExtension({\n  token: string     // GitHub token (fine-grained PAT or App installation token) (required)\n  owner: string     // Repository owner / org, e.g. \"acme\" (required)\n  repo: string      // Repository name, e.g. \"web\" (required)\n  baseUrl?: string  // API base URL (default \"https://api.github.com\"; set for GitHub Enterprise Server)\n  labels?: string[] // Labels applied to every created issue\n}): ServerExtension[]\n```\n\nAll three required fields (`token`, `owner`, `repo`) are validated at construction time — a missing value throws immediately so misconfiguration fails fast.\n\n### `GitHubConfig`\n\n```ts\ntype GitHubConfig = {\n  token: string\n  owner: string\n  repo: string\n  baseUrl?: string\n}\n```\n\n### `GitHubExtensionOptions`\n\n`GitHubConfig` plus an optional `labels?: string[]` array.\n\n## Configuration / env vars\n\n| Env var | Description |\n|---|---|\n| `AIRSIDE_GITHUB_TOKEN` | GitHub token (fine-grained PAT, Issues: write). Deliberately **not** `GITHUB_TOKEN`, which GitHub Actions auto-injects scoped to the CI repo. |\n| `AIRSIDE_GITHUB_OWNER` | Repository owner / org, e.g. `acme` |\n| `AIRSIDE_GITHUB_REPO` | Repository name, e.g. `web` |\n\n## Requirements\n\n- Node.js ≥ 18 (or any fetch-capable runtime)\n- A GitHub repository with Issues enabled (GitHub.com or Enterprise Server)\n\n## Related packages\n\n- **`@airnauts/airside-server`** — defines `ServerExtension` and `ThreadActionExtension`\n- **`@airnauts/airside-extension-jira`** — Jira Cloud thread-action extension\n- **`@airnauts/airside-extension-slack`** — Slack notification extension\n- **`@airnauts/airside-extension-email`** — email notification extension\n\n## License\n\nMIT © Airnauts\n","readmeFilename":"README.md","_rev":"1-a00014c5f2a8ed7d1d7eccf406dde983"}