0
Get Issue
One script reply has been approved by the moderators Verified
Created by rossrekrutkin 632 days ago Viewed 434 times
0
Submitted by lplit Deno
Verified 551 days ago
1
/*
2
@param: {Gitlab} glab - Resource containing Gitlab Auth API Key
3
Example:
4
{
5
  auth: gitlab_api_key,
6
  baseUrl: "https://www.gitlab.com"
7
}
8
*/
9
type Gitlab = {
10
  baseUrl: string;
11
  token: string;
12
};
13
export async function main(glab: Gitlab, projectId: number, issueId: number) {
14
  const url = `${glab.baseUrl}/api/v4/projects/${projectId}/issues/${issueId}`;
15
  const issue = await fetch(`${url}`, {
16
    headers: { Authorization: `Bearer: ${glab.token}` },
17
  });
18
  return await issue.json();
19
}
20

Other submissions