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

Move to Probot #43

Open
hzoo opened this Issue Dec 21, 2017 · 9 comments

Comments

Projects
None yet
5 participants
@hzoo
Copy link
Member

hzoo commented Dec 21, 2017

https://github.com/probot/probot

Should use the framework instead of our own thing

@DrewML

This comment has been minimized.

Copy link
Member

DrewML commented Jan 4, 2018

Works for me. I've clearly been terrible about maintaining this. You always assume something is going to be small and not need a framework, and then it grows 😆

@aaronang

This comment has been minimized.

Copy link
Member

aaronang commented Jan 9, 2018

I would love to work on this but currently, I have to focus on graduating first 😞 I will check in again once I am done with my master's thesis.

@ericduran

This comment has been minimized.

Copy link

ericduran commented Jan 24, 2018

Is this still a want? I've been looking over at probot and the handlers currently in this repo.

I figure I could start with some of the most basic handlers and slowly start moving it over one by one instead of a big switch.

Thoughts? I was thinking of starting with the issues/opened.js handler since that one seems pretty straight forward.

If this seems cool, do let me know. I'm going to get started later in the day. If anyone has an alternative approach or maybe a better handler to start with, let me know :).

Thanks.

@JasonEtco

This comment has been minimized.

Copy link

JasonEtco commented May 7, 2018

Would love to help with this @hzoo! Will try to hack away at it this upcoming weekend, though my bandwidth this week is low; are the features in this repo's README up to date?

@hzoo

This comment has been minimized.

Copy link
Member

hzoo commented May 7, 2018

I believe so other than the existing prs? Haven't updated it in so long

I'm sure a lot of the features are already probot apps too? wonder if you can just reuse like https://github.com/eslint/eslint-github-bot

@JasonEtco

This comment has been minimized.

Copy link

JasonEtco commented May 7, 2018

I'm sure a lot of the features are already probot apps too

Yep:

A couple of these are only kind of the right fit for the related feature - might be worth rewriting them into one app anyway, but its up to you.

@hzoo

This comment has been minimized.

Copy link
Member

hzoo commented May 7, 2018

Yeah, possible that most of them are simple enough to do anyway - would be nice to be able to import it as a dep and then run it from one app

@JasonEtco

This comment has been minimized.

Copy link

JasonEtco commented May 7, 2018

You actually can, by npm install-ing the repo (since most of them aren't on NPM) then either calling the exported function with your own robot:

module.exports = robot => {
  someOtherProbotApp(robot)
  anotherProbotApp(robot)
}

robot is effictively an event emitter, so calling those apps' exported functions is adding a new event handler via robot.on, and it gets all the magical authentication bits from the over-arching app's robot.

Or, we also have some docs for "combining apps".

Only issue with doing this is that unless the app is exactly what you need, you can't configure or change it. That's typical for dependencies in general, but Probot doesn't have a way of passing options on an app level (there is context.config but thats per-repo).

@hzoo

This comment has been minimized.

Copy link
Member

hzoo commented May 7, 2018

Ok sounds like what babel's presets were originally before: just an array of plugins. But then we added preset and plugin option to be able to configure

@hzoo hzoo added the enhancement label May 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment