mirror of
https://github.com/Findus23/adopt-a-plugin.git
synced 2024-08-27 19:52:11 +02:00
add discussion
This commit is contained in:
parent
96c7ebc182
commit
e0231e5cb2
2 changed files with 28 additions and 0 deletions
20
data.php
Normal file
20
data.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
$discussions = [
|
||||
"Chat" => "https://github.com/VincentLahaye/piwik-chat/issues/15",
|
||||
"ClickHeat" => "https://github.com/piwikjapan/plugin-clickheat/issues/26",
|
||||
"InterSites" => "https://github.com/PiwikPRO/plugin-InterSites/issues/24",
|
||||
"IPv6Usage" => "https://github.com/halfdan/IPv6Usage/issues/26",
|
||||
"KafkaPush" => "https://github.com/bruery/piwik-plugin-kafkapush/issues/3",
|
||||
"LoginRevokable" => "https://github.com/torosian/LoginRevokable/issues/2",
|
||||
"MaxConcurrent" => "https://github.com/mikekerr247/MaxConcurrent/issues/6",
|
||||
"PerformanceInfo" => "https://github.com/ThaDafinser/Piwik-PerformanceInfo/pull/8",
|
||||
"PerformanceMonitor" => "https://github.com/chanzler/piwik-performance-monitor/issues/2",
|
||||
"ReportPublisher" => "https://github.com/julienmoumne/piwik-report-publisher/issues/1",
|
||||
"RerUserDates" => "https://github.com/RegioneER/RerUserDates/issues/12",
|
||||
"SimplePageBuilder" => "https://github.com/PiwikPRO/plugin-SimplePageBuilder/issues/10",
|
||||
"SnoopyBehavioralScoring" => "https://github.com/spletnik/snoopy-behavioral-scoring/issues/6",
|
||||
"TrackingCodeCustomizer" => "https://github.com/jbrule/piwikplugin-TrackingCodeCustomizer/issues/3",
|
||||
"UptimeRobotMonitor" => "https://github.com/job963/UptimeRobot-Monitor/issues/8",
|
||||
"VisitorAvatar" => "https://github.com/surenjie/VisitorAvatar/issues/5",
|
||||
"WebsiteGroups" => "https://github.com/PiwikPRO/plugin-WebsiteGroups/issues/19"
|
||||
];
|
8
main.php
8
main.php
|
@ -31,11 +31,16 @@ function emphasis($string) {
|
|||
return "*$string*";
|
||||
}
|
||||
|
||||
function bold($string) {
|
||||
return "**$string**";
|
||||
}
|
||||
|
||||
function formatDate($datestring) {
|
||||
return date("Y-m-d", strtotime($datestring));
|
||||
}
|
||||
|
||||
require_once "vendor/autoload.php";
|
||||
require_once "data.php";
|
||||
|
||||
$json = file_get_contents("https://plugins.matomo.org/api/2.0/plugins");
|
||||
$piwikVersion = trim(file_get_contents("https://api.piwik.org/1.0/getLatestVersion/"));
|
||||
|
@ -83,6 +88,9 @@ foreach ($data->plugins as $plugin) {
|
|||
output(sprintf("%s commits by %s contributors | last commit was on %s",
|
||||
$activity->numCommits, $activity->numContributors, formatDate($activity->lastCommitDate)));
|
||||
output("Downloads: " . $plugin->numDownloads);
|
||||
if (isset($discussions[$plugin->name])) {
|
||||
output(bold(url("Discussion about this plugin", $discussions[$plugin->name])));
|
||||
}
|
||||
if (!empty($plugin->screenshots)) {
|
||||
output(image($plugin->name, $plugin->screenshots));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue