1 | import * as wmill from "https://deno.land/x/windmill@v1.85.0/mod.ts"; |
2 |
|
3 | @param: {wmill.Resource<"gitlab">} glab - Resource containing Gitlab Auth API Key |
4 | Example: |
5 | { |
6 | auth: gitlab_api_key, |
7 | baseUrl: "https://www.gitlab.com" |
8 | } |
9 | */ |
10 | export async function main( |
11 | glab: wmill.Resource<"gitlab">, |
12 | projectId: number, |
13 | issueId: number |
14 | ) { |
15 | const url = `${glab.baseUrl}/api/v4/projects/${projectId}/issues/${issueId}`; |
16 | const issue = await fetch(`${url}`, { |
17 | headers: { "PRIVATE-TOKEN": `${glab.token}` }, |
18 | }); |
19 | return await issue.json(); |
20 | } |
21 |
|