forked from mirrors/probot
General cleanup (#350)
* re-order args for `bin/probot-run.js` - Local tunnel/internal properties are grouped together and appear first - GitHub App args are now grouped together and come second * standardize on block comment spacing in `lib/robot.js` - open comment is flush - all subsequent lines are indented by 1-space
This commit is contained in:
parent
01b347c9c4
commit
a7596e24d2
|
@ -9,12 +9,12 @@ const {findPrivateKey} = require('../lib/private-key')
|
|||
|
||||
program
|
||||
.usage('[options] <apps...>')
|
||||
.option('-p, --port <n>', 'Port to start the server on', process.env.PORT || 3000)
|
||||
.option('-t, --tunnel <subdomain>', 'Expose your local bot to the internet', process.env.SUBDOMAIN || process.env.NODE_ENV !== 'production')
|
||||
.option('-w, --webhook-path <path>', 'URL path which receives webhooks. Ex: `/webhook`', process.env.WEBHOOK_PATH)
|
||||
.option('-a, --app <id>', 'ID of the GitHub App', process.env.APP_ID)
|
||||
.option('-s, --secret <secret>', 'Webhook secret of the GitHub App', process.env.WEBHOOK_SECRET)
|
||||
.option('-p, --port <n>', 'Port to start the server on', process.env.PORT || 3000)
|
||||
.option('-P, --private-key <file>', 'Path to certificate of the GitHub App', findPrivateKey)
|
||||
.option('-w, --webhook-path <path>', 'URL path which receives webhooks. Ex: `/webhook`', process.env.WEBHOOK_PATH)
|
||||
.option('-t, --tunnel <subdomain>', 'Expose your local bot to the internet', process.env.SUBDOMAIN || process.env.NODE_ENV !== 'production')
|
||||
.parse(process.argv)
|
||||
|
||||
if (!program.app) {
|
||||
|
|
30
lib/robot.js
30
lib/robot.js
|
@ -177,21 +177,21 @@ function rateLimitedClient (github) {
|
|||
module.exports = (...args) => new Robot(...args)
|
||||
|
||||
/**
|
||||
* Do the thing
|
||||
* @callback Robot~webhookCallback
|
||||
* @param {Context} context - the context of the event that was triggered,
|
||||
* including `context.payload`, and helpers for extracting information from
|
||||
* the payload, which can be passed to GitHub API calls.
|
||||
*
|
||||
* ```js
|
||||
* module.exports = robot => {
|
||||
* robot.on('push', context => {
|
||||
* // Code was pushed to the repo, what should we do with it?
|
||||
* robot.log(context);
|
||||
* });
|
||||
* };
|
||||
* ```
|
||||
*/
|
||||
* Do the thing
|
||||
* @callback Robot~webhookCallback
|
||||
* @param {Context} context - the context of the event that was triggered,
|
||||
* including `context.payload`, and helpers for extracting information from
|
||||
* the payload, which can be passed to GitHub API calls.
|
||||
*
|
||||
* ```js
|
||||
* module.exports = robot => {
|
||||
* robot.on('push', context => {
|
||||
* // Code was pushed to the repo, what should we do with it?
|
||||
* robot.log(context);
|
||||
* });
|
||||
* };
|
||||
* ```
|
||||
*/
|
||||
|
||||
/**
|
||||
* A [GitHub webhook event](https://developer.github.com/webhooks/#events) payload
|
||||
|
|
Loading…
Reference in New Issue