1 | import * as wmill from "https://deno.land/x/windmill@v1.34.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 | } |
8 | */ |
9 | export async function main( |
10 | glab: wmill.Resource<"gitlab">, |
11 | projectId: string, |
12 | ) { |
13 | const url = `https://gitlab.com/api/v4/projects/${projectId}/repository/commits`; |
14 | const issue = await fetch(`${url}`, { |
15 | headers: { |
16 | "Authorization": `Bearer: ${glab.token}`, |
17 | "Content-Type": "application/json", |
18 | } |
19 | }); |
20 | return await issue.json(); |
21 | } |
22 |
|