Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Actions #37

Open
benoror opened this issue Dec 1, 2016 · 1 comment
Open

Custom Actions #37

benoror opened this issue Dec 1, 2016 · 1 comment

Comments

@benoror
Copy link

benoror commented Dec 1, 2016

I would like to trigger a custom action on release event type, in order to print the body text & release name with markdown. What's the best approach for overriding eventActions = require('./event-actions/all')

Cheers!

@benoror
Copy link
Author

benoror commented Dec 1, 2016

Might be related to: #23

Maybe having a way to override eventActions, would something like this works?:

_ = require('lodash');
//...
eventActions = require('./event-actions/all')
customConsumerActions = require('utils/custom-actions');

_assign(eventActions, customConsumerActions);
//..

Then utils/custom-actions.js would live in the consumer's app file structure & look like this:

export function release(adapter, data, cb) {
    callback(`
      # ${data.action}: ${data.release}
      ${data.release.html_url}
      ---
      ${data.release.body}
    `);
}

Thoughts?

benoror added a commit to benoror/hubot-github-repo-event-notifier that referenced this issue Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant