Gets a release from gitlab
1
type Gitlab = {
2
baseUrl: string;
3
token: string;
4
};
5
6
export async function main(
7
glab: Gitlab,
8
projectId: number,
9
releaseTag: string,
10
) {
11
const url = `${glab.baseUrl}/api/v4/projects/${projectId}/releases/${releaseTag}`;
12
const response = await fetch(`${url}`, {
13
headers: { "PRIVATE-TOKEN": `${glab.token}` },
14
});
15
return await response.json();
16
}
17