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

Commit fd6aa9d

Browse files
committed
Import from Kanboard core
0 parents  commit fd6aa9d

36 files changed

Lines changed: 1218 additions & 0 deletions

Controller/Webhook.php

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

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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return array(
4+
'By @%s on Gitlab' => 'Od @%s s Gitlab-om',
5+
'Gitlab issue comment created' => 'Gitlab: dodan komentar za problem',
6+
// 'Gitlab issue reopened' => '',
7+
'Gitlab commit received' => 'Gitlab: commit dobijen',
8+
'Gitlab issue opened' => 'Gitlab: problem otvoren',
9+
'Gitlab issue closed' => 'Gitlab: problem zatvoren',
10+
'Gitlab webhooks' => 'Gitlab webhooks',
11+
'Help on Gitlab webhooks' => 'Pomoc na Gitlab webhooks',
12+
);
13+

Locale/cs_CZ/translations.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return array(
4+
'By @%s on Gitlab' => 'uživatelem @%s na Gitlab',
5+
'Gitlab issue comment created' => 'Vytvořen komentář problému na Gitlab',
6+
// 'Gitlab issue reopened' => '',
7+
'Gitlab commit received' => 'Gitlab commit erhalten',
8+
'Gitlab issue opened' => 'Gitlab Fehler eröffnet',
9+
'Gitlab issue closed' => 'Gitlab Fehler geschlossen',
10+
'Gitlab webhooks' => 'Gitlab Webhook',
11+
'Help on Gitlab webhooks' => 'Hilfe für Gitlab Webhooks',
12+
);
13+

Locale/da_DK/translations.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return array(
4+
// 'By @%s on Gitlab' => '',
5+
// 'Gitlab issue comment created' => '',
6+
// 'Gitlab issue reopened' => '',
7+
// 'Gitlab commit received' => '',
8+
// 'Gitlab issue opened' => '',
9+
// 'Gitlab issue closed' => '',
10+
// 'Gitlab webhooks' => '',
11+
// 'Help on Gitlab webhooks' => '',
12+
);
13+

Locale/de_DE/translations.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return array(
4+
'By @%s on Gitlab' => 'Durch @%s auf Gitlab',
5+
'Gitlab issue comment created' => 'Gitlab Ticket Kommentar erstellt',
6+
'Gitlab issue reopened' => 'Gitlab Thema wiedereröffnet',
7+
'Gitlab commit received' => 'Gitlab-Commit erhalten',
8+
'Gitlab issue opened' => 'Gitlab-Issue eröffnet',
9+
'Gitlab issue closed' => 'Gitlab-Issue geschlossen',
10+
'Gitlab webhooks' => 'Gitlab-Webhook',
11+
'Help on Gitlab webhooks' => 'Hilfe für Gitlab-Webhooks',
12+
);
13+

Locale/es_ES/translations.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return array(
4+
'By @%s on Gitlab' => 'Por @%s en Gitlab',
5+
'Gitlab issue comment created' => 'Creado comentario de asunto de Gitlab',
6+
// 'Gitlab issue reopened' => '',
7+
'Gitlab commit received' => 'Recibido envío desde Gitlab',
8+
'Gitlab issue opened' => 'Abierto asunto de Gitlab',
9+
'Gitlab issue closed' => 'Cerrado asunto de Gitlab',
10+
'Gitlab webhooks' => 'Disparadores Web (Webhooks) de Gitlab',
11+
'Help on Gitlab webhooks' => 'Ayuda sobre Disparadores Web (Webhooks) de Gitlab',
12+
);
13+

Locale/fi_FI/translations.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return array(
4+
// 'By @%s on Gitlab' => '',
5+
// 'Gitlab issue comment created' => '',
6+
// 'Gitlab issue reopened' => '',
7+
// 'Gitlab commit received' => '',
8+
// 'Gitlab issue opened' => '',
9+
// 'Gitlab issue closed' => '',
10+
// 'Gitlab webhooks' => '',
11+
// 'Help on Gitlab webhooks' => '',
12+
);
13+

Locale/fr_FR/translations.php

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

Locale/hu_HU/translations.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return array(
4+
// 'By @%s on Gitlab' => '',
5+
// 'Gitlab issue comment created' => '',
6+
// 'Gitlab issue reopened' => '',
7+
'Gitlab commit received' => 'Gitlab commit érkezett',
8+
'Gitlab issue opened' => 'Gitlab issue nyitás',
9+
'Gitlab issue closed' => 'Gitlab issue zárás',
10+
'Gitlab webhooks' => 'Gitlab webhooks',
11+
'Help on Gitlab webhooks' => 'Gitlab webhooks súgó',
12+
);
13+

0 commit comments

Comments
 (0)