facebookarchive/mention-bot

Getting "Skipping because the repo is not visible from mention-bot"

kenhowardpdx opened this issue · 7 comments

I've created my own mention-bot instance by following the instructions in the README but I'm unable to get it working.

Here's the log from heroku after receiving a webhook on a newly created pull request.

2016-07-05T22:31:12.439529+00:00 heroku[web.1]: State changed from starting to up
2016-07-05T22:34:39.534191+00:00 app[web.1]: https://github.com/csgpro/csgpro.com/pull/109
2016-07-05T22:34:39.645828+00:00 app[web.1]: Skipping because the repo is not visible from mention-bot.

The repo is public and I've added my user (@csgfrank) as a collaborator on the repo.

vjeux commented

Hmm this is weird

https://github.com/facebook/mention-bot/blob/2652842e6088625b140f822476f71ea3c1744fcf/server.js#L150-L154

this is the line that is causing the issue. I'm not really sure why it wouldn't work out of the top of my head. Could you add console.log in the path and see if there's any useful info?

2016-07-06T00:17:38.118580+00:00 app[web.1]: repo: csgpro.com
2016-07-06T00:17:38.118636+00:00 app[web.1]: path: .mention-bot
2016-07-06T00:17:38.348791+00:00 app[web.1]: Skipping because the repo is not visible from mention-bot.
2016-07-06T00:17:38.380515+00:00 heroku[router]: at=info method=POST path="/" host=mention-bot-frank.herokuapp.com request_id=c89c35c6-1448-48f6-b2c6-d20dc3e744ce fwd="192.30.252.40" dyno=web.1 connect=1ms service=297ms status=200 bytes=117
2016-07-06T00:18:04.590483+00:00 app[web.1]: https://github.com/csgpro/csgpro.com/pull/109
2016-07-06T00:18:04.590602+00:00 app[web.1]: user: csgpro
2016-07-06T00:18:04.652564+00:00 heroku[router]: at=info method=POST path="/" host=mention-bot-frank.herokuapp.com request_id=a1cddacd-778f-4c96-936d-236b9286510a fwd="192.30.252.34" dyno=web.1 connect=1ms service=71ms status=200 bytes=117

I've come to the conclusion that mention-bot requires the .mention-bot file in the root of my project. This is not ideal. But I have the power to change it. :)

@vjeux After some modifications to server.js I was able to get this working without a .mention-bot file in each repository. However, the pull request I used in this example was quite large (7,843 files changed) and resulted in a maxBuffer exceeded error.

[Error: stdout maxBuffer exceeded]

With the current code this will result in a server timeout. I'll submit a PR to let the POST return a 500 error.

vjeux commented

Thanks for the pr.

Have you figured out why the mention-bot file was required? This is not expected. I'd love to fix this bug :)

@vjeux Sorry about the blasting of commit mentions here. I had to sync your master before making these changes.

vjeux commented

No worries, I like when people are working on stuff, makes me happy :)