0
Get release
One script reply has been approved by the moderators Verified

Gets a release from gitlab

Created by steven orvis919 219 days ago Viewed 131 times
0
Submitted by steven orvis919 Deno
Verified 219 days ago
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