buildbot / buildbot/buildbot_travis
Github webhooks: cannot pass secret (was: Github webhooks are not actually supported)
- Dominant language
- Python
- Stars
- 129
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
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
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the master.cfg webhook configuration described in the issue and check the project's documentation for the GitHub change-hook secret setup. Reconcile the current instructions with the obsolete configuration block; done means a newcomer can configure the secret without needing the old codebaseGenerator workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, python
- Domain
- ci-cd
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100