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

Commit

Permalink
Import from Kanboard core
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed Jan 8, 2016
0 parents commit fd6aa9d
Show file tree
Hide file tree
Showing 36 changed files with 1,218 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Controller/Webhook.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Kanboard\Plugin\GitlabWebhook\Controller;

use Kanboard\Controller\Base;
use Kanboard\Plugin\GitlabWebhook\WebhookHandler;

/**
* Webhook Controller
*
* @package controller
* @author Frederic Guillot
*/
class Webhook extends Base
{
/**
* Handle Gitlab webhooks
*
* @access public
*/
public function handler()
{
$this->checkWebhookToken();

$gitlabWebhook = new WebhookHandler($this->container);
$gitlabWebhook->setProjectId($this->request->getIntegerParam('project_id'));
$result = $gitlabWebhook->parsePayload($this->request->getJson());

echo $result ? 'PARSED' : 'IGNORED';
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Frédéric Guillot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
13 changes: 13 additions & 0 deletions Locale/bs_BA/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
'By @%s on Gitlab' => 'Od @%s s Gitlab-om',
'Gitlab issue comment created' => 'Gitlab: dodan komentar za problem',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => 'Gitlab: commit dobijen',
'Gitlab issue opened' => 'Gitlab: problem otvoren',
'Gitlab issue closed' => 'Gitlab: problem zatvoren',
'Gitlab webhooks' => 'Gitlab webhooks',
'Help on Gitlab webhooks' => 'Pomoc na Gitlab webhooks',
);

13 changes: 13 additions & 0 deletions Locale/cs_CZ/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
'By @%s on Gitlab' => 'uživatelem @%s na Gitlab',
'Gitlab issue comment created' => 'Vytvořen komentář problému na Gitlab',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => 'Gitlab commit erhalten',
'Gitlab issue opened' => 'Gitlab Fehler eröffnet',
'Gitlab issue closed' => 'Gitlab Fehler geschlossen',
'Gitlab webhooks' => 'Gitlab Webhook',
'Help on Gitlab webhooks' => 'Hilfe für Gitlab Webhooks',
);

13 changes: 13 additions & 0 deletions Locale/da_DK/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
// 'Gitlab commit received' => '',
// 'Gitlab issue opened' => '',
// 'Gitlab issue closed' => '',
// 'Gitlab webhooks' => '',
// 'Help on Gitlab webhooks' => '',
);

13 changes: 13 additions & 0 deletions Locale/de_DE/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
'By @%s on Gitlab' => 'Durch @%s auf Gitlab',
'Gitlab issue comment created' => 'Gitlab Ticket Kommentar erstellt',
'Gitlab issue reopened' => 'Gitlab Thema wiedereröffnet',
'Gitlab commit received' => 'Gitlab-Commit erhalten',
'Gitlab issue opened' => 'Gitlab-Issue eröffnet',
'Gitlab issue closed' => 'Gitlab-Issue geschlossen',
'Gitlab webhooks' => 'Gitlab-Webhook',
'Help on Gitlab webhooks' => 'Hilfe für Gitlab-Webhooks',
);

13 changes: 13 additions & 0 deletions Locale/es_ES/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
'By @%s on Gitlab' => 'Por @%s en Gitlab',
'Gitlab issue comment created' => 'Creado comentario de asunto de Gitlab',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => 'Recibido envío desde Gitlab',
'Gitlab issue opened' => 'Abierto asunto de Gitlab',
'Gitlab issue closed' => 'Cerrado asunto de Gitlab',
'Gitlab webhooks' => 'Disparadores Web (Webhooks) de Gitlab',
'Help on Gitlab webhooks' => 'Ayuda sobre Disparadores Web (Webhooks) de Gitlab',
);

13 changes: 13 additions & 0 deletions Locale/fi_FI/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
// 'Gitlab commit received' => '',
// 'Gitlab issue opened' => '',
// 'Gitlab issue closed' => '',
// 'Gitlab webhooks' => '',
// 'Help on Gitlab webhooks' => '',
);

14 changes: 14 additions & 0 deletions Locale/fr_FR/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

return array(
'By @%s on Gitlab' => 'Par @%s sur Gitlab',
'Gitlab issue comment created' => 'Commentaire créé sur un ticket Gitlab',
'Gitlab issue reopened' => 'Ticket Gitlab rouvert',
'Gitlab commit received' => 'Commit reçu via Gitlab',
'Gitlab issue opened' => 'Ouverture d\'un ticket sur Gitlab',
'Gitlab issue closed' => 'Fermeture d\'un ticket sur Gitlab',
'Gitlab webhooks' => 'Webhook Gitlab',
'Help on Gitlab webhooks' => 'Aide sur les webhooks Gitlab',
'Bind Gitlab webhook events to Kanboard automatic actions' => 'Connecte les événements de Gitlab aux actions automatiques de Kanboard',
);

13 changes: 13 additions & 0 deletions Locale/hu_HU/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => 'Gitlab commit érkezett',
'Gitlab issue opened' => 'Gitlab issue nyitás',
'Gitlab issue closed' => 'Gitlab issue zárás',
'Gitlab webhooks' => 'Gitlab webhooks',
'Help on Gitlab webhooks' => 'Gitlab webhooks súgó',
);

13 changes: 13 additions & 0 deletions Locale/id_ID/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
'By @%s on Gitlab' => 'Dengan @%s pada Gitlab',
'Gitlab issue comment created' => 'Komentar dibuat pada tiket Gitlab',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => 'Menerima komit Gitlab',
'Gitlab issue opened' => 'Tiket Gitlab dibuka',
'Gitlab issue closed' => 'Tiket Gitlab ditutup',
'Gitlab webhooks' => 'Webhook Gitlab',
'Help on Gitlab webhooks' => 'Bantuan pada webhook Gitlab',
);

13 changes: 13 additions & 0 deletions Locale/it_IT/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => 'Commit ricevuto da Gitlab',
'Gitlab issue opened' => 'Issue di Gitlab aperta',
'Gitlab issue closed' => 'Issue di Gitlab chiusa',
'Gitlab webhooks' => 'Webhooks di Gitlab',
'Help on Gitlab webhooks' => 'Guida ai Webhooks di Gitlab',
);

13 changes: 13 additions & 0 deletions Locale/ja_JP/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => 'Gitlab コミットを受診しました',
'Gitlab issue opened' => 'Gitlab Issue がオープンされました',
'Gitlab issue closed' => 'Gitlab Issue がクローズされました',
'Gitlab webhooks' => 'Gitlab Webhooks',
'Help on Gitlab webhooks' => 'Gitlab Webhooks のヘルプ',
);

13 changes: 13 additions & 0 deletions Locale/nb_NO/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
// 'Gitlab commit received' => '',
// 'Gitlab issue opened' => '',
// 'Gitlab issue closed' => '',
// 'Gitlab webhooks' => '',
// 'Help on Gitlab webhooks' => '',
);

13 changes: 13 additions & 0 deletions Locale/nl_NL/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => 'Gitlab commir ontvangen',
'Gitlab issue opened' => 'Gitlab issue geopend',
'Gitlab issue closed' => 'Gitlab issue gesloten',
'Gitlab webhooks' => 'Gitlab webhooks',
'Help on Gitlab webhooks' => 'Hulp bij Gitlab webhooks',
);

13 changes: 13 additions & 0 deletions Locale/pl_PL/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
// 'Gitlab commit received' => '',
// 'Gitlab issue opened' => '',
// 'Gitlab issue closed' => '',
// 'Gitlab webhooks' => '',
// 'Help on Gitlab webhooks' => '',
);

13 changes: 13 additions & 0 deletions Locale/pt_BR/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
'By @%s on Gitlab' => 'Por @%s no Gitlab',
'Gitlab issue comment created' => 'Comentário criado em um bilhete Gitlab',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => 'Gitlab commit received',
'Gitlab issue opened' => 'Gitlab issue opened',
'Gitlab issue closed' => 'Gitlab issue closed',
'Gitlab webhooks' => 'Gitlab webhooks',
'Help on Gitlab webhooks' => 'Ajuda sobre os webhooks do GitLab',
);

13 changes: 13 additions & 0 deletions Locale/pt_PT/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
'By @%s on Gitlab' => 'Por @%s no Gitlab',
'Gitlab issue comment created' => 'Comentário a problema no Gitlab adicionado',
'Gitlab issue reopened' => 'Problema Gitlab reaberto',
'Gitlab commit received' => 'Commit recebido do Gitlab',
'Gitlab issue opened' => 'Problema aberto no Gitlab',
'Gitlab issue closed' => 'Problema fechado no Gitlab',
'Gitlab webhooks' => 'Gitlab webhooks',
'Help on Gitlab webhooks' => 'Ajuda sobre Gitlab webhooks',
);

13 changes: 13 additions & 0 deletions Locale/ru_RU/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
'By @%s on Gitlab' => 'От @%s на Gitlab',
'Gitlab issue comment created' => 'Был создан комментарий к задаче на Gitlab',
'Gitlab issue reopened' => 'Gitlab вопрос переоткрыт',
'Gitlab commit received' => 'Получен коммит с Gitlab',
'Gitlab issue opened' => 'Gitlab вопрос открыт',
'Gitlab issue closed' => 'Gitlab вопрос закрыт',
'Gitlab webhooks' => 'Gitlab webhooks',
'Help on Gitlab webhooks' => 'Помощь по Gitlab webhooks',
);

13 changes: 13 additions & 0 deletions Locale/sr_Latn_RS/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
// 'Gitlab commit received' => '',
// 'Gitlab issue opened' => '',
// 'Gitlab issue closed' => '',
// 'Gitlab webhooks' => '',
// 'Help on Gitlab webhooks' => '',
);

13 changes: 13 additions & 0 deletions Locale/sv_SE/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
'By @%s on Gitlab' => 'Av @%s på Gitlab',
'Gitlab issue comment created' => 'Gitlab frågekommentar skapad',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => 'Gitlab bidrag mottaget',
'Gitlab issue opened' => 'Gitlab fråga öppnad',
'Gitlab issue closed' => 'Gitlab fråga stängd',
'Gitlab webhooks' => 'Gitlab webhooks',
'Help on Gitlab webhooks' => 'Hjälp för Gitlab webhooks',
);

13 changes: 13 additions & 0 deletions Locale/th_TH/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
// 'Gitlab commit received' => '',
// 'Gitlab issue opened' => '',
// 'Gitlab issue closed' => '',
// 'Gitlab webhooks' => '',
// 'Help on Gitlab webhooks' => '',
);

13 changes: 13 additions & 0 deletions Locale/tr_TR/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
// 'Gitlab commit received' => '',
// 'Gitlab issue opened' => '',
// 'Gitlab issue closed' => '',
// 'Gitlab webhooks' => '',
// 'Help on Gitlab webhooks' => '',
);

13 changes: 13 additions & 0 deletions Locale/zh_CN/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return array(
// 'By @%s on Gitlab' => '',
// 'Gitlab issue comment created' => '',
// 'Gitlab issue reopened' => '',
'Gitlab commit received' => '收到 Gitlab 提交',
'Gitlab issue opened' => '开启 Gitlab 问题',
'Gitlab issue closed' => '关闭 Gitlab 问题',
'Gitlab webhooks' => 'Gitlab 网络钩子',
'Help on Gitlab webhooks' => 'Gitlab 网络钩子帮助',
);

3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
all:
@ echo "Build archive for plugin ${plugin} version=${version}"
@ git archive HEAD --prefix=${plugin}/ --format=zip -o ${plugin}-${version}.zip
Loading

0 comments on commit fd6aa9d

Please sign in to comment.