{"_id":"github-app","_rev":"2956413","name":"github-app","description":"NodeJS module for building GitHub Apps","dist-tags":{"latest":"4.0.1"},"maintainers":[{"name":"bkeepers","email":""}],"time":{"modified":"2023-04-27T07:38:10.000Z","created":"2017-06-25T19:58:23.351Z","4.0.1":"2018-08-27T22:59:50.939Z","4.0.0":"2018-08-20T21:37:40.053Z","3.2.0":"2017-09-05T17:03:26.474Z","3.1.0":"2017-08-25T19:22:47.765Z","3.0.0":"2017-06-25T19:58:23.351Z"},"users":{},"author":{"name":"Brandon Keepers"},"repository":{"type":"git","url":"git+https://github.com/probot/github-app.git"},"versions":{"4.0.1":{"name":"github-app","version":"4.0.1","description":"NodeJS module for building GitHub Apps","repository":{"type":"git","url":"git+https://github.com/probot/github-app.git"},"main":"index.js","scripts":{"test":"standard"},"author":{"name":"Brandon Keepers"},"license":"ISC","dependencies":{"@octokit/rest":"^15.10.0","jsonwebtoken":"^8.2.1"},"devDependencies":{"eslint-plugin-import":"^2.7.0","standard":"^11.0.1"},"standard":{"env":["mocha"]},"gitHead":"9c896937b02c5a7c36aebc9b203866530395b193","bugs":{"url":"https://github.com/probot/github-app/issues"},"homepage":"https://github.com/probot/github-app#readme","_id":"github-app@4.0.1","_npmVersion":"6.1.0","_nodeVersion":"8.9.4","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"dist":{"shasum":"afd370b02c7dcc092dc579b8396e9c831db0f910","size":2166,"noattachment":false,"key":"/github-app/-/github-app-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-app/download/github-app-4.0.1.tgz"},"maintainers":[{"name":"bkeepers","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/github-app_4.0.1_1535410790869_0.4804831768172353"},"_hasShrinkwrap":false,"publish_time":1535410790939,"_cnpm_publish_time":1535410790939,"_cnpmcore_publish_time":"2021-12-16T21:26:26.418Z"},"4.0.0":{"name":"github-app","version":"4.0.0","description":"NodeJS module for building GitHub Apps","repository":{"type":"git","url":"git+https://github.com/probot/github-app.git"},"main":"index.js","scripts":{"test":"standard"},"author":{"name":"Brandon Keepers"},"license":"ISC","dependencies":{"@octokit/rest":"^15.10.0","jsonwebtoken":"^8.2.1"},"devDependencies":{"eslint-plugin-import":"^2.7.0","standard":"^11.0.1"},"standard":{"env":["mocha"]},"gitHead":"a2d9268d8cbe903775e0ef2078584661add17261","bugs":{"url":"https://github.com/probot/github-app/issues"},"homepage":"https://github.com/probot/github-app#readme","_id":"github-app@4.0.0","_npmVersion":"6.1.0","_nodeVersion":"8.9.4","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"dist":{"shasum":"f1ab8b31ed66a7b68faba8b8f7389cb6e0b016be","size":2162,"noattachment":false,"key":"/github-app/-/github-app-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-app/download/github-app-4.0.0.tgz"},"maintainers":[{"name":"bkeepers","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/github-app_4.0.0_1534801059974_0.2446233055784146"},"_hasShrinkwrap":false,"publish_time":1534801060053,"_cnpm_publish_time":1534801060053,"_cnpmcore_publish_time":"2021-12-16T21:26:26.640Z"},"3.2.0":{"name":"github-app","version":"3.2.0","description":"NodeJS module for building GitHub Apps","repository":{"type":"git","url":"git+https://github.com/probot/github-app.git"},"main":"index.js","scripts":{"test":"xo"},"author":{"name":"Brandon Keepers"},"license":"ISC","dependencies":{"github":"^10.1.0","jsonwebtoken":"^7.3.0"},"devDependencies":{"xo":"^0.18.0"},"xo":{"esnext":true,"space":true,"rules":{"camelcase":1}},"gitHead":"3767f3d038d6f941f734e44c9064d668c7d51d6e","bugs":{"url":"https://github.com/probot/github-app/issues"},"homepage":"https://github.com/probot/github-app#readme","_id":"github-app@3.2.0","_npmVersion":"5.4.0","_nodeVersion":"8.2.1","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"dist":{"shasum":"dfd5a4e87b75629723ba0ec63d8d0aeccb2f39a6","size":2143,"noattachment":false,"key":"/github-app/-/github-app-3.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-app/download/github-app-3.2.0.tgz"},"maintainers":[{"name":"bkeepers","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/github-app-3.2.0.tgz_1504631005514_0.6725412937812507"},"directories":{},"publish_time":1504631006474,"_hasShrinkwrap":false,"_cnpm_publish_time":1504631006474,"_cnpmcore_publish_time":"2021-12-16T21:26:26.826Z"},"3.1.0":{"name":"github-app","version":"3.1.0","description":"NodeJS module for building GitHub Apps","repository":{"type":"git","url":"git+https://github.com/probot/github-app.git"},"main":"index.js","scripts":{"test":"xo"},"author":{"name":"Brandon Keepers"},"license":"ISC","dependencies":{"github":"^9.3.1","jsonwebtoken":"^7.3.0"},"devDependencies":{"xo":"^0.18.0"},"xo":{"esnext":true,"space":true,"rules":{"camelcase":1}},"gitHead":"3e859d98e8dedfa51f544f1fe50d4ce4ee9cb573","bugs":{"url":"https://github.com/probot/github-app/issues"},"homepage":"https://github.com/probot/github-app#readme","_id":"github-app@3.1.0","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"dist":{"shasum":"ab1485804634a8b708607f741e8e8b9a350ca3aa","size":2203,"noattachment":false,"key":"/github-app/-/github-app-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-app/download/github-app-3.1.0.tgz"},"maintainers":[{"name":"bkeepers","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/github-app-3.1.0.tgz_1503688966354_0.7632722754497081"},"directories":{},"publish_time":1503688967765,"_hasShrinkwrap":false,"_cnpm_publish_time":1503688967765,"_cnpmcore_publish_time":"2021-12-16T21:26:27.012Z"},"3.0.0":{"name":"github-app","version":"3.0.0","description":"NodeJS module for building GitHub Apps","repository":{"type":"git","url":"git+https://github.com/probot/github-app.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":"8acdd2c36a2c2123f440632293036403fcdbc408","bugs":{"url":"https://github.com/probot/github-app/issues"},"homepage":"https://github.com/probot/github-app#readme","_id":"github-app@3.0.0","_npmVersion":"5.0.3","_nodeVersion":"7.8.0","_npmUser":{"name":"bkeepers","email":"brandon@opensoul.org"},"dist":{"shasum":"6d6e056a9e27683b3778c5955ca9a12e5623b736","size":2216,"noattachment":false,"key":"/github-app/-/github-app-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-app/download/github-app-3.0.0.tgz"},"maintainers":[{"name":"bkeepers","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/github-app-3.0.0.tgz_1498420702394_0.7382926875725389"},"directories":{},"publish_time":1498420703351,"_hasShrinkwrap":false,"_cnpm_publish_time":1498420703351,"_cnpmcore_publish_time":"2021-12-16T21:26:27.228Z"}},"readme":"# GitHub Apps\n\nNodeJS module for building [GitHub Apps](https://developer.github.com/apps/).\n\n## Installation\n\n```\nnpm install --save github-app\n```\n\n## Usage\n\n```js\nconst createApp = require('github-app');\n\nconst app = createApp({\n  // Your app id\n  id: 987,\n  // The private key for your app, which can be downloaded from the\n  // app's settings: https://github.com/settings/apps\n  cert: require('fs').readFileSync('private-key.pem')\n});\n```\n\n### `asInstallation`\n\nAuthenticate [as an installation](https://developer.github.com/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/#authenticating-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 Apps](https://developer.github.com/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/#authenticating-as-an-installation):\n\n```js\n//Modify value according to getInstallations return(example in asApp section)\nvar installationId = 99999;\n\napp.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### `asApp`\n\nAuthenticate [as an app](https://developer.github.com/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/#authenticating-as-a-github-app), also returning an instance of the GitHub API client.\n\n```js\napp.asApp().then(github => {\n  console.log(\"Installations:\")\n  github.apps.getInstallations({}).then(console.log);\n});\n```\n","_attachments":{},"homepage":"https://github.com/probot/github-app#readme","bugs":{"url":"https://github.com/probot/github-app/issues"},"license":"ISC"}