gitea api for homepage repo list :)

This commit is contained in:
Ben Harris 2018-06-04 18:28:09 -04:00
parent 688d2bc7ad
commit 52033f0507
1 changed files with 4 additions and 4 deletions

View File

@ -66,11 +66,11 @@
<?php endforeach; ?>
<h1>~current projects~</h1>
<h4>on our <a href="https://github.com/tilde-team">github org</a></h4>
<h4>on our <a href="https://git.tilde.team/meta">gitea</a></h4>
<hr>
<?php
ini_set('user_agent', 'tilde-team');
foreach (json_decode(file_get_contents("https://api.github.com/orgs/tilde-team/repos")) ?? [] as $repo): ?>
foreach (json_decode(file_get_contents("https://git.tilde.team/api/v1/orgs/meta/repos")) ?? [] as $repo): ?>
<div class="list-group">
<div class="list-group-item">
@ -78,9 +78,9 @@
<h3 class="list-group-item-heading"><?=$repo->name?></h3>
</a>
<p class="list-group-item-text"><?=$repo->description?></p>
<?php if ($repo->homepage != ""): ?>
<?php if ($repo->website != ""): ?>
<hr style="border-top: 1px solid #000;">
<em><a href="<?=$repo->homepage?>"><?=$repo->homepage?></a></em>
<em><a href="<?=$repo->website?>"><?=$repo->website?></a></em>
<?php endif; ?>
</div>
</div>