Skip to content

Commit

Permalink
Move default secret so it works for programatic uses
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Jun 27, 2017
1 parent 9dd1afd commit 0078c31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/probot-run.js
Expand Up @@ -11,7 +11,7 @@ program
.usage('[options] <plugins...>')
.option('-i, --integration <id>', 'DEPRECATED: ID of the GitHub App', process.env.INTEGRATION_ID)
.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 || 'development')
.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('-t, --tunnel <subdomain>', 'Expose your local bot to the internet', process.env.SUBDOMAIN || process.env.NODE_ENV !== 'production')
Expand Down
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -9,7 +9,7 @@ const Raven = require('raven');
const createRobot = require('./lib/robot');
const createServer = require('./lib/server');

module.exports = options => {
module.exports = (options = {}) => {
const cache = cacheManager.caching({
store: 'memory',
ttl: 60 * 60 // 1 hour
Expand All @@ -24,7 +24,7 @@ module.exports = options => {
}
});

const webhook = createWebhook({path: '/', secret: options.secret});
const webhook = createWebhook({path: '/', secret: options.secret || 'development'});
const app = createApp({
id: options.id,
cert: options.cert,
Expand Down

0 comments on commit 0078c31

Please sign in to comment.