<div dir="ltr">Hi Shulhan,<div>I realize the doc is quite concise. the custom handler will only work for overriding an existing plugin handler, so you should use:</div><div><div>c['www'] = {</div><div>        ...</div><div>        ,       "change_hook_dialects":{</div><div>                        "base": {</div><div>                                "custom_class": MattermostCommandHandler</div><div>                        }</div><div>                }</div><div>        }</div></div><div>and then point your mattermost hook to  <a href="http://yourbotip">http://yourbotip</a><span style="color:rgb(33,33,33)">/change_hook/base</span></div><div><br></div>If you want to point to <a href="http://yourbotip">http://yourbotip</a><span style="color:rgb(33,33,33)"><a href="http://yourbotip/change_hook/mattermost">/change_hook/mattermost</a>  you have no choice but to make a buildbot plugin</span><br style="color:rgb(33,33,33)"><div>HTH</div><div>Pierre</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 3, 2017 at 5:30 AM Shulhan <<a href="mailto:m.shulhan@gmail.com">m.shulhan@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 02 Nov 2017 18:46:34 +0000<br>
Pierre Tardy <<a href="mailto:tardyp@gmail.com" target="_blank">tardyp@gmail.com</a>> wrote:<br>
<br>
Hi Mr. Tardy,<br>
<br>
Thanks for quick reply and answer.<br>
<br>
> Hi Shulhan,<br>
><br>
> The www hooks are now customizable via the buildbot plugin system<br>
><br>
> The default one are configured here.<br>
> <a href="https://github.com/buildbot/buildbot/blob/master/master/setup.py#L415" rel="noreferrer" target="_blank">https://github.com/buildbot/buildbot/blob/master/master/setup.py#L415</a><br>
><br>
> I would suggest you to create your own python package and distribute<br>
> your buildbot-mattermost plugin on pypi.<br>
<br>
Currently this is not an option right now due to time constraints and<br>
my limited Python knowledge.<br>
<br>
><br>
> If your plugin is simple enough, you can also fit it in the<br>
> master.cfg. See doc at<br>
> <a href="http://docs.buildbot.net/latest/manual/cfg-wwwhooks.html#custom-hooks" rel="noreferrer" target="_blank">http://docs.buildbot.net/latest/manual/cfg-wwwhooks.html#custom-hooks</a><br>
><br>
<br>
So, I change the custom hook based on example above.<br>
<br>
- Copy the script `mattermost.py` to build master directory<br>
- Change master.cfg to,<br>
<br>
```<br>
from mattermost import MattermostCommandHandler<br>
<br>
c['www'] = {<br>
        ...<br>
        ,       "change_hook_dialects":{<br>
                        "base": {<br>
                                "mattermost": MattermostCommandHandler<br>
                        }<br>
                }<br>
        }<br>
```<br>
<br>
- Restart the buildmaster service<br>
- Test executing command from Mattermost<br>
<br>
Output from buildmaster,<br>
<br>
  2017-11-03 04:20:09+0000 [_GenericHTTPChannelProtocol,0,172.32.1.208] The dialect specified, 'mattermost', wasn't whitelisted in change_hook<br>
  2017-11-03 04:20:09+0000 [_GenericHTTPChannelProtocol,0,172.32.1.208] Note: if dialect is 'base' then it's possible your URL is malformed and we didn't regex it properly<br>
<br>
Does the "base" config above translated to "/custom_hook/mattermost"?<br>
<br>
And then I try load custom hook with following config,<br>
<br>
```<br>
c['www'] = {<br>
        ...<br>
        ,       "change_hook_dialects":{<br>
                        "base": {<br>
                                "mattermost": MattermostCommandHandler<br>
                        }<br>
                ,       "mattermost": True<br>
                }<br>
        }<br>
```<br>
<br>
The buildmaster output,<br>
<br>
  2017-11-03 04:25:17+0000 [_GenericHTTPChannelProtocol,0,172.32.1.208] The dialect specified, 'mattermost', is not registered as a buildbot.webhook plugin<br>
<br>
Thanks in advance for your help.<br>
</blockquote></div>