Github webhook v1.0.6 plugin problems

Is anyone using the kanboard-github-webhook plugin with the latest Kanboard 1.2.43?

How are you all getting github issues into kanboard?

I absolutely need some type of integration with github issues, and the official github webhook plugin does not work. It seems though its unmaintained and no longer working, when I open an new issue in github and the webhook fires, the logs show the response as:



<br />
<b>Fatal error</b>:  Uncaught TypeError: Symfony\Component\EventDispatcher\EventDispatcher::dispatch(): Argument #1 ($event) must be of type object, string given, called in /var/www/app/plugins/GithubWebhook/WebhookHandler.php on line 203 and defined in /var/www/app/libs/event-dispatcher/EventDispatcher.php:48
Stack trace:
#0 /var/www/app/plugins/GithubWebhook/WebhookHandler.php(203): Symfony\Component\EventDispatcher\EventDispatcher-&gt;dispatch()
#1 /var/www/app/plugins/GithubWebhook/WebhookHandler.php(128): Kanboard\Plugin\GithubWebhook\WebhookHandler-&gt;handleIssueOpened()
#2 /var/www/app/plugins/GithubWebhook/WebhookHandler.php(61): Kanboard\Plugin\GithubWebhook\WebhookHandler-&gt;parseIssueEvent()
#3 /var/www/app/plugins/GithubWebhook/Controller/Webhook.php(28): Kanboard\Plugin\GithubWebhook\WebhookHandler-&gt;parsePayload()
#4 /var/www/app/app/Core/Controller/Runner.php(77): Kanboard\Plugin\GithubWebhook\Controller\Webhook-&gt;handler()
#5 /var/www/app/app/Core/Controller/Runner.php(31): Kanboard\Core\Controller\Runner-&gt;executeController()
#6 /var/www/app/index.php(9): Kanboard\Core\Controller\Runner-&gt;execute()
#7 {main}
  thrown in <b>/var/www/app/libs/event-dispatcher/EventDispatcher.php</b> on line <b>48</b><br />

Just another victim of Symphonys decision to swap the ordering of the function arguments.
To fix this, someone (you) needs to patch all occurrences of $this->dispatcher->dispatch(), according to my solution below.

I tried to fix the dispatcher issue, but without testing is alive. Thus, I don’t know whether there are more issues.

Good luck!

Hey Alfredb,
Thanks!

I did find this plugin that worked for me:

Looks like it was updated due to Symfony changes.

1 Like