Skip to content
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

Github webhooks: cannot pass secret (was: Github webhooks are not actually supported) #108

Open
MarSoft opened this issue Mar 21, 2019 · 0 comments

Comments

@MarSoft
Copy link
Contributor

MarSoft commented Mar 21, 2019

After more investigating, it seems that it is actually supported, I just used the wrong way to configure secret value.
The right way: in (my master root)/master.cfg, after auto-generated stuff, add the following:

c['www']'change_hook_dialects']['secret'] = 'MyGitHubSecret'
Support for github webhooks is mentioned in the docstring for `buildbot_travis.vcs.github.GitHub` class but is not actually implemented. Here is how to enable it in current state (at least the steps I already made).

OBSOLETE In (my master root)/master.cfg, after auto-generated stuff, add the following:

c['www']['change_hook_dialects'] = dict(github={'secret': 'MyGitHubSecret'})

# now fix codebaseGenerator which probably works good for polling
# but fails for webhook-produced changes
repo_to_projects = {
    'githubuser/reponame': 'projectname',
}
c['codebaseGenerator'] = lambda chdict: repo_to_projects.get(chdict['project'], chdict['project'])

# optionally, make other amendings to auto-generated config
@MarSoft MarSoft changed the title Github webhooks are not actually supported Github webhooks: cannot pass secret (was: Github webhooks are not actually supported) Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant