Hi GNUtoo and all,

I can't remember the content of the GitLab RSS Panel, but cgit does provide 
Atom commit feeds, i.e. 
https://git.replicant.us/contrib/GNUtoo/www.replicant.us/atom/?h=master

These doesn"t work with the WP Panel or doesn"t contain the desired content?

// Marius


On 2020-12-15 05:40, Denis 'GNUtoo' Carikli wrote:
When migrating away from GitLab (mainly due to too heavy resources
consumption) to cgit, the git RSS feed stopped working as cgit
doesn't generate an RSS feed.

While it's probably possible to deploy some software like git2rss[1]
to restore that functionality, we still haven't deployed and
configured such software.

In the meantime, we can remove the broken git RSS panel as it has
been broken for years since we migrated away from GitLab, and
restore it if or when we will have installed new software to bring
back the RSS feed for git.

This commit has been tested with Iceweasel 81.0.2 from Parabola i686
on the static version of this website generated with the make command.

References:
-----------
[1]https://git.remirepo.net/cgit/tools/git2rss.git

Signed-off-by: Denis 'GNUtoo' Carikli <gnu...@cyberdimension.org>
---
  index.php | 52 ----------------------------------------------------
  1 file changed, 52 deletions(-)

diff --git a/index.php b/index.php
index 080510a..272e985 100644
--- a/index.php
+++ b/index.php
@@ -57,58 +57,6 @@ if ($feed->error() || !$feed_init) {
                        break;
        }
  }
-?>
-                               </ul>
-                       </div>
-               </div>
-               <div class="col-md-4">
-                       <div class="panel panel-default">
-                               <div class="panel-heading"><span class="glyphicon glyphicon-cog"></span> 
<a href="https://git.replicant.us/replicant";>Replicant git</a></div>
-                               <ul class="list-group">
-<?php
-$feed = new SimplePie();
-
-$feed->set_feed_url("https://git.replicant.us/groups/replicant.atom";);
-$feed->set_cache_location("cache/");
-
-$feed_init = $feed->init();
-
-if ($feed->error() || !$feed_init) {
-       print("\t\t\t\t\t<li class=\"list-group-item list-group-item-danger\">Loading RSS 
feed failed</li>\n");
-} else {
-       $count = 1;
-
-       foreach ($feed->get_items() as $item) {
-               preg_match("/git\.replicant\.us\/replicant\/([^\/]*)\//", 
$item->get_permalink(), $repo);
-               if ($repo == null)
-                       continue;
-
-               $repo_link = "https://git.replicant.us/replicant/".$repo[1];
-
-               preg_match("/pushed to project branch ([^ ]*) /", 
$item->get_title(), $branch);
-               if ($branch == null)
-                       continue;
-
-               $commits_contents = preg_grep("/<blockquote><p dir=\"auto\">/", 
explode("\n", $item->get_content()));
-               if ($commits_contents == null)
-                       continue;
-
-               print("\t\t\t\t\t<li class=\"list-group-item\"><a href=\"".$repo_link."/\">".$repo[1]."</a> 
(<strong>".$branch[1]."</strong>):<br /><ul>");
-
-               foreach ($commits_contents as $commit_content) {
-                       preg_match("/<blockquote><p dir=\"auto\">(.*)<\/p>/", 
$commit_content, $commit);
-                       if ($commit == null)
-                               continue;
-
-                       print("<li><a 
href=\"".$item->get_permalink()."\">".$commit[1]."</a></li>");
-               }
-
-               print("</ul><small>Pushed on <strong>".$item->get_date("j F Y")."</strong> by 
<strong>".$item->get_author()->get_name()."</strong></small></li>\n");
-
-               if ($count++ >= 8)
-                       break;
-       }
-}
  ?>
                                </ul>
                        </div>


Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to