gitlab : retour du flux rss gitlab
Bonjour,
Dans le fichier https://git.spip.net/spip-contrib-extensions/rss_commits/src/branch/master/rss_commits_fonctions.php#L76
Je souhaite avoir plus d'information dans le traitement entre les lignes 79 et 88 :
$titre = $value['title'];
$descriptif = array();
if (preg_match('/pushed new project branch/', $titre)) {
preg_match('/branch\s(.+)?(at)/', $titre, $m);
$titre = 'La branche '.trim($m['1']).' a été créer';
} elseif (preg_match('/pushed to branch/', $titre) OR preg_match('/pushed to project branch/', $titre)) {
preg_match('/branch\s(.+)?(at)/', $titre, $m);
$titre = 'La branche '.trim($m['1']).' a été mise à jour';
} elseif (preg_match('/pushed new project tag/', $titre)) {
preg_match('/tag\s(.+)?(at)/', $titre, $m);
$titre = 'Rajout du tag '.trim($m['1']);
$descriptif[] = $value['summary']['div']['blockquote']['p'];
} elseif (preg_match('/deleted project branch/', $titre)) {
preg_match('/branch\s(.+)?(at)/', $titre, $m);
$titre = 'Suppression de la branche '.trim($m['1']);
}
$descriptif = implode('\n- ', $descriptif);
Cela afficherais dans le tableau ce qui a été fait dans le commit / push.
Ensuite des fois le $value['summary']['div']['blockquote']
contient
[blockquote] => Array
(
[p] => Merge branch 'release/IDFMSUIVI-346'
)
et d'autre fois
[blockquote] => Array
(
[0] => Array
(
[p] => Fix mess err generation site
)
[1] => Array
(
[p] => Merge branch 'feature/FIX-NOTIFICATIONS' into develop
)
Comment géré dans ce cas ?
Merci