Skip to content
This repository was archived by the owner on Apr 5, 2020. It is now read-only.

Commit de21dba

Browse files
committed
First commit
0 parents  commit de21dba

39 files changed

Lines changed: 2974 additions & 0 deletions

Controller/Webhook.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
namespace Kanboard\Plugin\GithubWebhook\Controller;
4+
5+
use Kanboard\Controller\Base;
6+
use Kanboard\Plugin\GithubWebhook\WebhookHandler;
7+
8+
/**
9+
* Webhook Controller
10+
*
11+
* @package controller
12+
* @author Frederic Guillot
13+
*/
14+
class Webhook extends Base
15+
{
16+
/**
17+
* Handle Github webhooks
18+
*
19+
* @access public
20+
*/
21+
public function handler()
22+
{
23+
$this->checkWebhookToken();
24+
25+
$githubWebhook = new WebhookHandler($this->container);
26+
$githubWebhook->setProjectId($this->request->getIntegerParam('project_id'));
27+
28+
$result = $githubWebhook->parsePayload(
29+
$this->request->getHeader('X-Github-Event'),
30+
$this->request->getJson()
31+
);
32+
33+
echo $result ? 'PARSED' : 'IGNORED';
34+
}
35+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Frédéric Guillot
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Locale/bs_BA/translations.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
return array(
4+
'Github commit received' => 'Github: commit dobijen',
5+
'Github issue opened' => 'Github: otvoren problem',
6+
'Github issue closed' => 'Github: zatvoren problem',
7+
'Github issue reopened' => 'Github: ponovo otvoren problem',
8+
'Github issue assignee change' => 'Github: izmijenjen izvršioc problema',
9+
'Github issue label change' => 'Github: izmjena etikete problema',
10+
'Github webhooks' => 'Github webhooks',
11+
'Help on Github webhooks' => 'Pomoć na Github webhooks',
12+
'Github issue comment created' => 'Github: dodan komentar za problem',
13+
'Github Issue' => 'Github problemi',
14+
'Commit made by @%s on Github' => 'Commit-ao @%s na Github',
15+
);
16+

Locale/cs_CZ/translations.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
return array(
4+
'Github commit received' => 'Github commit empfangen',
5+
'Github issue opened' => 'Github Fehler geöffnet',
6+
'Github issue closed' => 'Github Fehler geschlossen',
7+
'Github issue reopened' => 'Github Fehler erneut geöffnet',
8+
'Github issue assignee change' => 'Github Fehlerzuständigkeit geändert',
9+
'Github issue label change' => 'Github Fehlerkennzeichnung verändert',
10+
'Github webhooks' => 'Github Webhook',
11+
'Help on Github webhooks' => 'Hilfe für Github Webhooks',
12+
'Github issue comment created' => 'Github Fehler Kommentar hinzugefügt',
13+
'Github Issue' => 'Github Issue',
14+
// 'Commit made by @%s on Github' => '',
15+
);
16+

Locale/da_DK/translations.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
return array(
4+
'Github commit received' => 'Github commit modtaget',
5+
'Github issue opened' => 'Github problem åbet',
6+
'Github issue closed' => 'Github problem lukket',
7+
'Github issue reopened' => 'Github problem genåbnet',
8+
'Github issue assignee change' => 'Github problem ansvarlig skift',
9+
'Github issue label change' => 'Github problem label skift',
10+
// 'Github webhooks' => '',
11+
// 'Help on Github webhooks' => '',
12+
// 'Github issue comment created' => '',
13+
// 'Github Issue' => '',
14+
// 'Commit made by @%s on Github' => '',
15+
);
16+

Locale/de_DE/translations.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
return array(
4+
'Github commit received' => 'Github commit empfangen',
5+
'Github issue opened' => 'Github Fehler geöffnet',
6+
'Github issue closed' => 'Github Fehler geschlossen',
7+
'Github issue reopened' => 'Github Fehler erneut geöffnet',
8+
'Github issue assignee change' => 'Github Fehlerzuständigkeit geändert',
9+
'Github issue label change' => 'Github Fehlerkennzeichnung verändert',
10+
'Github webhooks' => 'Github-Webhook',
11+
'Help on Github webhooks' => 'Hilfe für Github-Webhooks',
12+
'Github issue comment created' => 'Kommentar zum Github-Issue hinzugefügt',
13+
'Github Issue' => 'Github Issue',
14+
'Commit made by @%s on Github' => 'Commit von @%s auf Github',
15+
);
16+

Locale/es_ES/translations.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
return array(
4+
'Github commit received' => 'Envío a Github recibido',
5+
'Github issue opened' => 'Abierto asunto en Github',
6+
'Github issue closed' => 'Cerrado asunto en Github',
7+
'Github issue reopened' => 'Reabierto asunto en Github',
8+
'Github issue assignee change' => 'Cambio en concesionario de asunto de Github',
9+
'Github issue label change' => 'Cambio en etiqueta de asunto de Github',
10+
'Github webhooks' => 'Disparadores Web (Webhooks) de Github',
11+
'Help on Github webhooks' => 'Ayuda con los Disparadores Web (Webhook) de Github',
12+
'Github issue comment created' => 'Creado el comentario del problema en Github',
13+
'Github Issue' => 'Problema con Github',
14+
'Commit made by @%s on Github' => 'Envío realizado por @%s en Github',
15+
);
16+

Locale/fi_FI/translations.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
return array(
4+
'Github commit received' => 'Github-kommitti vastaanotettu',
5+
'Github issue opened' => 'Github-issue avattu',
6+
'Github issue closed' => 'Github-issue suljettu',
7+
'Github issue reopened' => 'Github-issue uudelleenavattu',
8+
'Github issue assignee change' => 'Github-issuen saajan vaihto',
9+
'Github issue label change' => 'Github-issuen labelin vaihto',
10+
// 'Github webhooks' => '',
11+
// 'Help on Github webhooks' => '',
12+
// 'Github issue comment created' => '',
13+
'Github Issue' => 'Github-issue',
14+
// 'Commit made by @%s on Github' => '',
15+
);
16+

Locale/fr_FR/translations.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
return array(
4+
'Github commit received' => 'Commit reçu via Github',
5+
'Github issue opened' => 'Ouverture d\'un ticket sur Github',
6+
'Github issue closed' => 'Fermeture d\'un ticket sur Github',
7+
'Github issue reopened' => 'Réouverture d\'un ticket sur Github',
8+
'Github issue assignee change' => 'Changement d\'assigné sur un ticket Github',
9+
'Github issue label change' => 'Changement de libellé sur un ticket Github',
10+
'Github webhooks' => 'Webhook Github',
11+
'Help on Github webhooks' => 'Aide sur les webhooks Github',
12+
'Github issue comment created' => 'Commentaire créé sur un ticket Github',
13+
'Github Issue' => 'Ticket Github',
14+
'Commit made by @%s on Github' => 'Commit fait par @%s sur Github',
15+
'Bind Github webhook events to Kanboard automatic actions' => 'Connecte les événements de Github aux actions automatiques de Kanboard',
16+
);
17+

Locale/hu_HU/translations.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
return array(
4+
'Github commit received' => 'Github commit érkezett',
5+
'Github issue opened' => 'Github issue nyitás',
6+
'Github issue closed' => 'Github issue zárás',
7+
'Github issue reopened' => 'Github issue újranyitva',
8+
'Github issue assignee change' => 'Github issue felelős változás',
9+
'Github issue label change' => 'Github issue címke változás',
10+
'Github webhooks' => 'Github webhooks',
11+
'Help on Github webhooks' => 'Github Webhook súgó',
12+
'Github issue comment created' => 'Github issue megjegyzés létrehozva',
13+
'Github Issue' => 'Github issue',
14+
// 'Commit made by @%s on Github' => '',
15+
);
16+

0 commit comments

Comments
 (0)