samsontmr / oss-bot-js

Bot for managing first level PR reviews on OSS GitHub repos
2 stars 2 forks source link

Add documentation (setting up, etc) #5 #7

Closed samsontmr closed 7 years ago

samsontmr commented 7 years ago

Fixes #5

samsontmr commented 7 years ago

@damithc Do you mean setting up a TEAMMATES-specific bot server, or just getting TEAMMATES to send this one webhooks?

damithc commented 7 years ago

@damithc Do you mean setting up a TEAMMATES-specific bot server, or just getting TEAMMATES to send this one webhooks?

I guess a free heroku app is not enough for this?

samsontmr commented 7 years ago

I guess a free heroku app is not enough for this?

Hm what do you mean? I'm currently using a free Heroku app. Just that free accounts are limited to 5 apps and dyno use is limited.

damithc commented 7 years ago

From what I remember, a free heroku app doesn't have enough juice to stay up 24 hours a day. An app monitoring web hooks needs to be up 24 hours a day.

samsontmr commented 7 years ago

From what I know, it goes to sleep when there's no traffic and wakes up when the webhook is triggered.

EDIT: I just tested another of my bots from a while back and it's still responding.

damithc commented 7 years ago

Yes, that's how it works but it has a max wakeup time per day, right? I'm sure it also has a min idle period before it goes to sleep? So if the web hook is triggered often enough it's going to hit max wakeup time per day. Anyway, we can try it with TEAMMATES because if the webhook is only triggered when a new PR is created, the frequency should be low enough for the app to get enough sleep.

samsontmr commented 7 years ago

Oh the maximum wakeup time is about 18 hours. Unfortunately, it seems that any modification to a PR triggers the webhook. However, even though the server may be maxed out and unable to respond immediately, it should receive the payload once it comes back online. I think this is still acceptable since it's not a time-critical operation.

damithc commented 7 years ago

Let's try it out on TEAMMATES to see how it goes. Let's set up a new heroku app for it so that we can monitor its activity level without being affected by your own dev testing.