{"_id":"github-integration","_rev":"2956374","name":"github-integration","description":"NodeJS module for building GitHub Integrations","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"bkeepers","email":""}],"time":{"modified":"2023-04-27T07:37:57.000Z","created":"2017-02-26T22:26:16.902Z","2.0.1":"2017-06-04T14:40:44.687Z","2.0.0":"2017-06-03T13:47:25.636Z","1.0.0":"2017-02-26T22:26:16.902Z"},"users":{},"author":{"name":"Brandon Keepers"},"repository":{"type":"git","url":"git+https://github.com/bkeepers/github-integration.git"},"versions":{"2.0.1":{"name":"github-integration","version":"2.0.1","description":"NodeJS module for building GitHub Integrations","repository":{"type":"git","url":"git+https://github.com/bkeepers/github-integration.git"},"main":"index.js","scripts":{"test":"xo"},"author":{"name":"Brandon Keepers"},"license":"ISC","dependencies":{"github":"^9.2.0","jsonwebtoken":"^7.3.0"},"devDependencies":{"xo":"^0.18.0"},"xo":{"esnext":true,"space":true,"rules":{"camelcase":1}},"gitHead":"df1487055948d128c92f213837a123778c272e32","bugs":{"url":"https://github.com/bkeepers/github-integration/issues"},"homepage":"https://github.com/bkeepers/github-integration#readme","_id":"github-integration@2.0.1","_npmVersion":"5.0.2","_nodeVersion":"7.8.0","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"dist":{"shasum":"48c232283d0234f1638213af7915edb1bc3d0f93","size":2168,"noattachment":false,"key":"/github-integration/-/github-integration-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-integration/download/github-integration-2.0.1.tgz"},"maintainers":[{"name":"bkeepers","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/github-integration-2.0.1.tgz_1496587243798_0.4422689210623503"},"directories":{},"publish_time":1496587244687,"_hasShrinkwrap":false,"deprecated":"The github-integration package has been replaced by the github-app package","_cnpm_publish_time":1496587244687,"_cnpmcore_publish_time":"2021-12-16T21:26:29.296Z"},"2.0.0":{"name":"github-integration","version":"2.0.0","description":"NodeJS module for building GitHub Integrations","repository":{"type":"git","url":"git+https://github.com/bkeepers/github-integration.git"},"main":"index.js","scripts":{"test":"xo"},"author":{"name":"Brandon Keepers"},"license":"ISC","dependencies":{"github":"^9.2.0","github-webhook-handler":"^0.6.0","jsonwebtoken":"^7.3.0"},"devDependencies":{"xo":"^0.18.0"},"xo":{"esnext":true,"space":true,"rules":{"camelcase":1}},"gitHead":"0a401006b7e6da643a1872b31826651da5e299ef","bugs":{"url":"https://github.com/bkeepers/github-integration/issues"},"homepage":"https://github.com/bkeepers/github-integration#readme","_id":"github-integration@2.0.0","_shasum":"3a0f00b641462fad830ccd3bff787060e2d626e2","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.8.0","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"dist":{"shasum":"3a0f00b641462fad830ccd3bff787060e2d626e2","size":2149,"noattachment":false,"key":"/github-integration/-/github-integration-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-integration/download/github-integration-2.0.0.tgz"},"maintainers":[{"name":"bkeepers","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/github-integration-2.0.0.tgz_1496497644589_0.8953379013109952"},"directories":{},"publish_time":1496497645636,"_hasShrinkwrap":false,"deprecated":"The github-integration package has been replaced by the github-app package","_cnpm_publish_time":1496497645636,"_cnpmcore_publish_time":"2021-12-16T21:26:29.489Z"},"1.0.0":{"name":"github-integration","version":"1.0.0","description":"NodeJS module for building GitHub Integrations","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Brandon Keepers"},"license":"ISC","dependencies":{"github":"^8.1.0","github-webhook-handler":"^0.6.0","jsonwebtoken":"^7.3.0"},"gitHead":"43c35ba329b09a9abd271ee1d5186fd9a84fed8c","_id":"github-integration@1.0.0","_shasum":"1b94ba8b4c78dbaa026315262ebb7cd1a4dbbadb","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"dist":{"shasum":"1b94ba8b4c78dbaa026315262ebb7cd1a4dbbadb","size":2027,"noattachment":false,"key":"/github-integration/-/github-integration-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-integration/download/github-integration-1.0.0.tgz"},"maintainers":[{"name":"bkeepers","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/github-integration-1.0.0.tgz_1488147976335_0.18704520934261382"},"directories":{},"publish_time":1488147976902,"_hasShrinkwrap":false,"deprecated":"The github-integration package has been replaced by the github-app package","_cnpm_publish_time":1488147976902,"_cnpmcore_publish_time":"2021-12-16T21:26:29.711Z"}},"readme":"# GitHub Integration\n\nNodeJS module for building [GitHub Integrations](https://developer.github.com/early-access/integrations/).\n\n## Installation\n\n```\nnpm install --save github-integration\n```\n\n## Usage\n\n```js\nconst createIntegration = require('github-integration');\n\nconst integration = createIntegration({\n  // Your integration id\n  id: 987,\n  // The private key for your integration, which can be downloaded from the\n  // integration's settings: https://github.com/settings/integrations\n  cert: require('fs').readFileSync('private-key.pem')\n});\n```\n\n### `asInstallation`\n\nAuthenticate [as an installation](https://developer.github.com/early-access/integrations/authentication/#as-an-installation), returning a [github API client](https://github.com/mikedeboer/node-github), which can be used to call any of the [APIs supported by GitHub Integrations](https://developer.github.com/early-access/integrations/available-endpoints/):\n\n```js\nvar installationId = 99999;\n\nintegration.asInstallation(installationId).then(github => {\n  github.issues.createComment({\n    owner: 'foo',\n    repo: 'bar',\n    number: 999,\n    body: 'hello world!'\n  });\n});\n```\n\n### `asIntegration`\n\nAuthenticate [as an integration](https://developer.github.com/early-access/integrations/authentication/#as-an-integration), also returning an instance of the GitHub API client.\n\n```js\nintegration.asIntegration().then(github => {\n  console.log(\"Installations:\")\n  github.integrations.getInstallations({}).then(console.log);\n});\n```\n","_attachments":{},"homepage":"https://github.com/bkeepers/github-integration#readme","bugs":{"url":"https://github.com/bkeepers/github-integration/issues"},"license":"ISC"}