From 7c9b86044fe31bed7d66f903dfa883a432ae7ff2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <michael@minelli.me>
Date: Sat, 13 Jan 2024 02:00:16 +0100
Subject: [PATCH] GitlabManager => Add getReleases function

---
 ExpressAPI/src/managers/GitlabManager.ts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ExpressAPI/src/managers/GitlabManager.ts b/ExpressAPI/src/managers/GitlabManager.ts
index e65cde0..390fba5 100644
--- a/ExpressAPI/src/managers/GitlabManager.ts
+++ b/ExpressAPI/src/managers/GitlabManager.ts
@@ -13,6 +13,7 @@ import express           from 'express';
 import GitlabRoute       from '../shared/types/Gitlab/GitlabRoute';
 import SharedConfig      from '../shared/config/SharedConfig';
 import GitlabProfile     from '../shared/types/Gitlab/GitlabProfile';
+import GitlabRelease     from '../shared/types/Gitlab/GitlabRelease';
 
 
 class GitlabManager {
@@ -68,6 +69,12 @@ class GitlabManager {
         return response.data;
     }
 
+    async getRepositoryReleases(repoId: number): Promise<Array<GitlabRelease>> {
+        const response = await axios.get<Array<GitlabRelease>>(this.getApiUrl(GitlabRoute.REPOSITORY_RELEASES_GET).replace('{{id}}', String(repoId)));
+
+        return response.data;
+    }
+
     async createRepository(name: string, description: string, visibility: string, initializeWithReadme: boolean, namespace: number, sharedRunnersEnabled: boolean, wikiEnabled: boolean, import_url: string): Promise<GitlabRepository> {
         const response = await axios.post<GitlabRepository>(this.getApiUrl(GitlabRoute.REPOSITORY_CREATE), {
             name                  : name,
-- 
GitLab