New feature: Branch name for software products

This commit is contained in:
Steffen Lange 2020-04-01 17:25:40 +02:00
parent dd3be30e56
commit 3d037ec2b3
5 changed files with 13 additions and 6 deletions

View file

@ -31,7 +31,10 @@ $twitter = new Twitter($TwitterConsumerKey, $TwitterConsumerSecret, $TwitterAcce
for ($i = 0; $i < $db->count(); $i++) {
$patch = $db->get($i);
if ($last < $patch->getTimestamp()) {
$s = $patch->getVendor() . ' released #' . $patch->getProduct() . ' version ' . $patch->getVersion() . '. ' . $patch->getURL();
$s = $patch->getVendor() . ' released #' . $patch->getProduct();
if (!empty($patch->getBranch()))
$s .= ' ' . $patch->getBranch();
$s .= ' version ' . $patch->getVersion() . '. ' . $patch->getURL();
try {
$twitter->send($s);
} catch (DG\Twitter\Exception $e) {