facebookarchive / mention-bot

Automatically mention potential reviewers on pull requests.
Other
3.36k stars 270 forks source link

Empty response from the bot #33

Closed kaelig closed 8 years ago

kaelig commented 8 years ago

Thank you so much for this great tool.

I've deployed the bot at this address: https://mention-bot-salesforce-ux.herokuapp.com/ The setup was made using the "Deploy to Heroku" button and I followed the steps detailed in the README.

I've also tried to make it work locally and I get the same issue: When a PR is opened, the bot returns an empty response.

Here is the Pull Request:

https://github.com/salesforce-ux/design-system/pull/115/files

And the log, in case it helps:

2015-11-24T00:42:37.501257+00:00 app[web.1]: < Server: GitHub.com
2015-11-24T00:42:37.501258+00:00 app[web.1]: < Date: Tue, 24 Nov 2015 00:42:37 GMT
2015-11-24T00:42:37.501258+00:00 app[web.1]: < Content-Type: text/plain; charset=utf-8
2015-11-24T00:42:37.501259+00:00 app[web.1]: < Transfer-Encoding: chunked
2015-11-24T00:42:37.501259+00:00 app[web.1]: < Status: 200 OK
2015-11-24T00:42:37.501260+00:00 app[web.1]: < Content-Security-Policy: default-src *; script-src assets-cdn.github.com; object-src assets-cdn.github.com; style-src 'self' 'unsafe-inline' 'unsafe-eval' assets-cdn.github.com; img-src 'self' data: assets-cdn.github.com identicons.github.com www.google-analytics.com checkout.paypal.com collector.githubapp.com *.githubusercontent.com *.gravatar.com *.wp.com; media-src 'none'; frame-src 'self' render.githubusercontent.com gist.github.com www.youtube.com player.vimeo.com checkout.paypal.com; font-src assets-cdn.github.com; connect-src 'self' live.github.com wss://live.github.com uploads.github.com status.github.com api.github.com www.google-analytics.com api.braintreegateway.com client-analytics.braintreegateway.com github-cloud.s3.amazonaws.com; base-uri 'self'; form-action 'self' github.com gist.github.com
2015-11-24T00:42:37.501261+00:00 app[web.1]: < Public-Key-Pins: max-age=300; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="JbQbUG5JMJUoI6brnx0x3vZF6jilxsapbXGVfjhN8Fg="; includeSubDomains
2015-11-24T00:42:37.501261+00:00 app[web.1]: < Cache-Control: no-cache
2015-11-24T00:42:37.501262+00:00 app[web.1]: < X-GitHub-User: salesforce-ux-bot
2015-11-24T00:42:37.501270+00:00 app[web.1]: < X-GitHub-Session-Id: 79638831
2015-11-24T00:42:37.501271+00:00 app[web.1]: < Vary: X-PJAX
2015-11-24T00:42:37.501271+00:00 app[web.1]: < X-UA-Compatible: IE=Edge,chrome=1
2015-11-24T00:42:37.501272+00:00 app[web.1]: < Set-Cookie: user_session=drUI8QM-y_JXD3zJIB8YDcyddRLiiORfqzuNYHDJzyf9w7-HVlOyfUeS8dQwUOJlrMVbiHZUO1stBYzd; path=/; expires=Tue, 08 Dec 2015 00:42:37 -0000; secure; HttpOnly
2015-11-24T00:42:37.501272+00:00 app[web.1]: < X-Request-Id: b3da28dec689fb57384ce39e928ccff1
2015-11-24T00:42:37.501273+00:00 app[web.1]: < X-Runtime: 0.055354
2015-11-24T00:42:37.501274+00:00 app[web.1]: < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2015-11-24T00:42:37.501275+00:00 app[web.1]: < X-Content-Type-Options: nosniff
2015-11-24T00:42:37.501275+00:00 app[web.1]: < X-XSS-Protection: 1; mode=block
2015-11-24T00:42:37.501275+00:00 app[web.1]: < X-Frame-Options: deny
2015-11-24T00:42:37.501276+00:00 app[web.1]: < Vary: Accept-Encoding
2015-11-24T00:42:37.501277+00:00 app[web.1]: < X-Served-By: 50b06cef3698e972f044d7dc2cb41530
2015-11-24T00:42:37.501277+00:00 app[web.1]: < X-GitHub-Request-Id: 369D2655:19DE:82B4C68:5653B27D
2015-11-24T00:42:37.501278+00:00 app[web.1]: <
2015-11-24T00:42:37.501278+00:00 app[web.1]: { [data not shown]
  0     0    0   862    0     0   6422      0 --:--:-- --:--:-- --:--:--  6422
2015-11-24T00:42:37.501280+00:00 app[web.1]: * Connection #1 to host patch-diff.githubusercontent.com left intact
2015-11-24T00:42:37.570021+00:00 app[web.1]: * Hostname was NOT found in DNS cache
2015-11-24T00:42:37.570024+00:00 app[web.1]:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2015-11-24T00:42:37.570025+00:00 app[web.1]:                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 192.30.252.130...
2015-11-24T00:42:37.570027+00:00 app[web.1]: * Connected to github.com (192.30.252.130) port 443 (#0)
2015-11-24T00:42:37.570028+00:00 app[web.1]: * successfully set certificate verify locations:
2015-11-24T00:42:37.570028+00:00 app[web.1]: *   CAfile: none
2015-11-24T00:42:37.570029+00:00 app[web.1]:   CApath: /etc/ssl/certs
2015-11-24T00:42:37.570029+00:00 app[web.1]: * SSLv3, TLS handshake, Client hello (1):
2015-11-24T00:42:37.570030+00:00 app[web.1]: } [data not shown]
2015-11-24T00:42:37.570031+00:00 app[web.1]: * SSLv3, TLS handshake, Server hello (2):
2015-11-24T00:42:37.570031+00:00 app[web.1]: { [data not shown]
2015-11-24T00:42:37.570032+00:00 app[web.1]: * SSLv3, TLS handshake, CERT (11):
2015-11-24T00:42:37.570033+00:00 app[web.1]: { [data not shown]
2015-11-24T00:42:37.570034+00:00 app[web.1]: * SSLv3, TLS handshake, Server key exchange (12):
2015-11-24T00:42:37.570034+00:00 app[web.1]: { [data not shown]
2015-11-24T00:42:37.570035+00:00 app[web.1]: * SSLv3, TLS handshake, Server finished (14):
2015-11-24T00:42:37.570036+00:00 app[web.1]: { [data not shown]
2015-11-24T00:42:37.570036+00:00 app[web.1]: * SSLv3, TLS handshake, Client key exchange (16):
2015-11-24T00:42:37.570037+00:00 app[web.1]: } [data not shown]
2015-11-24T00:42:37.570037+00:00 app[web.1]: * SSLv3, TLS change cipher, Client hello (1):
2015-11-24T00:42:37.570038+00:00 app[web.1]: } [data not shown]
2015-11-24T00:42:37.570038+00:00 app[web.1]: * SSLv3, TLS handshake, Finished (20):
2015-11-24T00:42:37.570039+00:00 app[web.1]: } [data not shown]
2015-11-24T00:42:37.570039+00:00 app[web.1]: * SSLv3, TLS change cipher, Client hello (1):
2015-11-24T00:42:37.570040+00:00 app[web.1]: { [data not shown]
2015-11-24T00:42:37.570041+00:00 app[web.1]: * SSLv3, TLS handshake, Finished (20):
2015-11-24T00:42:37.570041+00:00 app[web.1]: { [data not shown]
2015-11-24T00:42:37.570042+00:00 app[web.1]: * SSL connection using ECDHE-RSA-AES128-GCM-SHA256
2015-11-24T00:42:37.570042+00:00 app[web.1]: * Server certificate:
2015-11-24T00:42:37.570044+00:00 app[web.1]: *   subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware; serialNumber=5157550; street=548 4th Street; postalCode=94107; C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
2015-11-24T00:42:37.570044+00:00 app[web.1]: *   start date: 2014-04-08 00:00:00 GMT
2015-11-24T00:42:37.570045+00:00 app[web.1]: *   expire date: 2016-04-12 12:00:00 GMT
2015-11-24T00:42:37.570045+00:00 app[web.1]: *   subjectAltName: github.com matched
2015-11-24T00:42:37.570046+00:00 app[web.1]: *   issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
2015-11-24T00:42:37.570046+00:00 app[web.1]: *   SSL certificate verify ok.
2015-11-24T00:42:37.570047+00:00 app[web.1]: > GET /salesforce-ux/design-system/blame/master/package.json HTTP/1.1
2015-11-24T00:42:37.570047+00:00 app[web.1]: > User-Agent: curl/7.35.0
2015-11-24T00:42:37.570048+00:00 app[web.1]: > Host: github.com
2015-11-24T00:42:37.570049+00:00 app[web.1]: > Accept: */*
2015-11-24T00:42:37.570050+00:00 app[web.1]: > Cookie: logged_in=yes;  domain=.github.com;  path=/;  expires=Sat, 24 Nov 2035 00:14:53 -0000;  secure;  HttpOnly; _gh_sess=eyJsYXN0X3dyaXRlIjoxNDQ4MzI0MDkzNDI3LCJzZXNzaW9uX2lkIjoiYTI3N2RjNGM3Njc2NmQ3ODYyYTk3MGY0OGYwYjQwMDYifQ%3D%3D--e8aa97dd4cd830d1a3d5e531fa602f47a010a1c5; user_session=drUI8QM-y_JXD3zJIB8YDcyddRLiiORfqzuNYHDJzyf9w7-HVlOr_SQS2-2I5HGEmf84qK0-zVzLQ9bV; dotcom_user=salesforce-ux-bot
2015-11-24T00:42:37.570050+00:00 app[web.1]: >
2015-11-24T00:42:37.570051+00:00 app[web.1]: < HTTP/1.1 404 Not Found
2015-11-24T00:42:37.570052+00:00 app[web.1]: * Server GitHub.com is not blacklisted
2015-11-24T00:42:37.570052+00:00 app[web.1]: < Server: GitHub.com
2015-11-24T00:42:37.570053+00:00 app[web.1]: < Date: Tue, 24 Nov 2015 00:42:37 GMT
2015-11-24T00:42:37.570054+00:00 app[web.1]: < Content-Type: application/json; charset=utf-8
2015-11-24T00:42:37.570054+00:00 app[web.1]: < Transfer-Encoding: chunked
2015-11-24T00:42:37.570055+00:00 app[web.1]: < Status: 404 Not Found
2015-11-24T00:42:37.570055+00:00 app[web.1]: < Content-Security-Policy: default-src 'none'; script-src 'self'; style-src 'unsafe-inline'; img-src data:; connect-src 'self'; form-action 'self'; base-uri 'self'
2015-11-24T00:42:37.570056+00:00 app[web.1]: < Public-Key-Pins: max-age=300; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="JbQbUG5JMJUoI6brnx0x3vZF6jilxsapbXGVfjhN8Fg="; includeSubDomains
2015-11-24T00:42:37.570057+00:00 app[web.1]: < Cache-Control: no-cache
2015-11-24T00:42:37.570057+00:00 app[web.1]: < X-GitHub-User: salesforce-ux-bot
2015-11-24T00:42:37.570058+00:00 app[web.1]: < X-GitHub-Session-Id: 79638831
2015-11-24T00:42:37.570059+00:00 app[web.1]: < Vary: X-PJAX
2015-11-24T00:42:37.570059+00:00 app[web.1]: < X-UA-Compatible: IE=Edge,chrome=1
2015-11-24T00:42:37.570060+00:00 app[web.1]: < Set-Cookie: user_session=drUI8QM-y_JXD3zJIB8YDcyddRLiiORfqzuNYHDJzyf9w7-HVlOyfUeS8dQwUOJlrMVbiHZUO1stBYzd; path=/; expires=Tue, 08 Dec 2015 00:42:37 -0000; secure; HttpOnly
2015-11-24T00:42:37.570063+00:00 app[web.1]: < X-Request-Id: dff368adde7838295af6afce73f5b4de
2015-11-24T00:42:37.570062+00:00 app[web.1]: < Set-Cookie: _gh_sess=eyJsYXN0X3dyaXRlIjoxNDQ4MzI0MDkzNDI3LCJzZXNzaW9uX2lkIjoiYTI3N2RjNGM3Njc2NmQ3ODYyYTk3MGY0OGYwYjQwMDYiLCJzcHlfcmVwbyI6InNhbGVzZm9yY2UtdXgvZGVzaWduLXN5c3RlbSIsInNweV9yZXBvX2F0IjoxNDQ4MzI1NzU3fQ%3D%3D--6004271c35dde6248e5a727ab6bdcc5714c20aa2; path=/; secure; HttpOnly
2015-11-24T00:42:37.570063+00:00 app[web.1]: < X-Runtime: 0.023144
2015-11-24T00:42:37.570064+00:00 app[web.1]: < X-Content-Type-Options: nosniff
2015-11-24T00:42:37.570064+00:00 app[web.1]: < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2015-11-24T00:42:37.570065+00:00 app[web.1]: < X-XSS-Protection: 1; mode=block
2015-11-24T00:42:37.570066+00:00 app[web.1]: < X-Frame-Options: deny
2015-11-24T00:42:37.570067+00:00 app[web.1]: <
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0< X-GitHub-Request-Id: 369D2655:19DD:72EE7A1:5653B27D
2015-11-24T00:42:37.570068+00:00 app[web.1]: { [data not shown]
100    21    0    21    0     0    376      0 --:--:-- --:--:-- --:--:--   375
2015-11-24T00:42:37.570088+00:00 app[web.1]: * Connection #0 to host github.com left intact
2015-11-24T00:42:37.570742+00:00 app[web.1]: https://github.com/salesforce-ux/design-system/pull/115 []

Let me know if you need additional information or if I can help in any ways.

zekenie commented 8 years ago

Hi @kaelig can you give a link to the pr you opened. here are some thoughts:

Another thought. I believe the bot will always return an empty response to github's webhook. It will simply make a second request to the github api to make the comment

kaelig commented 8 years ago

@zekenie the link to the PR is in my original post, can you access it? This is on a public repo, and lines did change.

Another bot (CLA Bot) I've setup had everything working but failed to comment. Do you know what could cause that?

Note that the bot has admin access to the repository. Does Two-factor authentication need to be activated on the account for commenting to work?

zekenie commented 8 years ago

Hmm, very strange. We might need to add some logging code to see what's going on. I think the github token for the bot account just needs to be able to comment on repos.

kaelig commented 8 years ago

Ok I think I may have found the issue.

The algorithm is comparing the PR to master. But our default branches have different names…

I'll be fixing that locally and if it works I'll do a PR.

udnisap commented 8 years ago

You can change teh default branch from github as well