I'm trying to add an automatic feedback from BuildBot to a github pull request using GitHubCommentPush
But I constantly get an error:
2019-07-18 09: 04: 56 + 0000 [-] Timing out client: IPv4Address (type = 'TCP', host = '86 .57.157.184 ', port = 42090)
2019-07-18 09: 04: 56 + 0000 [-] Timing out client: IPv4Address (type = 'TCP', host = '86 .57.245.94 ', port = 42086)
2019-07-18 09: 04: 56 + 0000 [-] Timing out client: IPv4Address (type = 'TCP', host = '86 .57.157.184 ', port = 42092)
2019-07-18 09: 04: 56 + 0000 [-] while invoking <bound method HttpStatusPushBase.buildStarted of <buildbot.reporters.github.GitHubCommentPush object at 0x7f4ae512aa20 >>
Traceback (most recent call last):
File "/home/andrei/bot/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send (result)
File "/home/andrei/bot/sandbox/lib/python3.6/site-packages/buildbot/reporters/http.py", line 80, in getMoreInfoAndSend
yield self.send (build)
File "/home/andrei/bot/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
return _cancellableInlineCallbacks (gen)
File "/home/andrei/bot/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
_inlineCallbacks (None, g, status)
--- <exception caught here> ---
File "/home/andrei/bot/sandbox/lib/python3.6/site-packages/buildbot/reporters/http.py", line 80, in getMoreInfoAndSend
yield self.send (build)
File "/home/andrei/bot/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send (result)
File "/home/andrei/bot/sandbox/lib/python3.6/site-packages/buildbot/reporters/github.py", line 177, in send
content = yield response.content ()
builtins.UnboundLocalError: local variable 'response' referenced before assignment
Apparently my GitHub token is not a valid .
I have no idea what kind of token the buildbot wants.
I tried to create OAuth Apps (but did not publish it in the GitHub Marketplace) and use the Client Secret of the created application as a token.
I tried to create GitHub Apps in the same way as above, I used Client Secret as a token.
I tried to create a Personal access token.
None of these points helped me.
Can anyone explain how this should work?
Here is the code for how I connect the service.
self.masterConf ['services'] = []
self.masterConf ['secretsProviders'] = [
secrets.SecretInAFile (dirname = "/ path / to / buildBotSecret")
]
gc = reporters.GitHubCommentPush (token = util.Secret ("gitHub"),
startDescription = 'Build started.',
endDescription = 'Build done.')
self.masterConf ['services']. append (gc)
It is bug of buildBot version 2.3.1.
Fixed PR