From fa8253c8bfee581c866673c3eb9ffc3ad95807f1 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sun, 23 Jun 2019 09:14:16 +0200 Subject: [PATCH] [GiteaBridge] Add new bridge Gitea is a fork of Gogs and therefore shares most of its features except for releases. --- bridges/GiteaBridge.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 bridges/GiteaBridge.php diff --git a/bridges/GiteaBridge.php b/bridges/GiteaBridge.php new file mode 100644 index 00000000..33247873 --- /dev/null +++ b/bridges/GiteaBridge.php @@ -0,0 +1,27 @@ +find('#release-list > li') + or returnServerError('Unable to find releases'); + + foreach($releases as $release) { + $this->items[] = array( + 'uri' => $release->find('a', 0)->href, + 'title' => 'Release ' . $release->find('h3', 0)->plaintext, + ); + } + } +}