Add random repo route

This commit is contained in:
Reimar 2025-05-07 13:44:08 +02:00
parent 512871ad87
commit 7d6c82a225
Signed by: Reimar
GPG Key ID: 93549FA07F0AE268

6
api/random_repo.php Normal file
View File

@ -0,0 +1,6 @@
<?php
$repos = json_decode(file_get_contents("https://git.reim.ar/api/v1/repos/search"))->data;
$repo = $repos[array_rand($repos)];
header("Location: $repo->html_url");