From 218823d3ce6b6a79a21809dcc68cf243dd70d933 Mon Sep 17 00:00:00 2001 From: Ben Orozco Date: Fri, 2 Dec 2016 23:08:15 -0600 Subject: [PATCH] Feature: Custom Actions Fix https://github.com/hubot-scripts/hubot-github-repo-event-notifier/issues/37 --- package.json | 5 +++-- src/github-repo-event-notifier.coffee | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7a70d19..121324f 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,9 @@ }, "dependencies": { "coffee-script": "~1.6", - "url": "~0.7.9", - "querystring": "~0.2.0" + "lodash": "^4.17.2", + "querystring": "~0.2.0", + "url": "~0.7.9" }, "devDependencies": { "mocha": "*", diff --git a/src/github-repo-event-notifier.coffee b/src/github-repo-event-notifier.coffee index c316493..d25f7e9 100644 --- a/src/github-repo-event-notifier.coffee +++ b/src/github-repo-event-notifier.coffee @@ -32,12 +32,16 @@ # patcon # parkr +_ = require('lodash') inspect = (require('util')).inspect url = require('url') querystring = require('querystring') -eventActions = require('./event-actions/all') eventTypesRaw = process.env['HUBOT_GITHUB_EVENT_NOTIFIER_TYPES'] eventTypes = [] +customActions = {} +try + customActions = require.main.require('../../../scripts/github/custom-actions') +eventActions = _.assign(require('./event-actions/all'), customActions) if eventTypesRaw? ###