import * as wmill from "https://deno.land/x/windmill@v1.34.0/mod.ts";
/*
@param: {wmill.Resource<"gitlab">} glab - Resource containing Gitlab Auth API Key
Example:
{
auth: gitlab_api_key
}
*/
export async function main(
glab: wmill.Resource<"gitlab">,
projectId: number,
) {
const url = `https://gitlab.com/api/v4/projects/${projectId}/issues`;
const issue = await fetch(`${url}`, {
headers: { "Authorization": `Bearer: ${glab.token}` },
});
return await issue.json();
}
Submitted by lplit 880 days ago