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