Search... Ctrl + K

Get Issue (gitlab)
One script reply has been approved by the moderators Verified

Created by rossrekrutkin 178 days ago Used 88 times 0 Points

No comments yet

Points: 0
deno
One script reply has been approved by the moderators
Ap­pro­ved
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,
  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: { "Authorization": `Bearer: ${glab.token}` },
  });
  return await issue.json();
}

Submitted by lplit 97 days ago

Edited 59 days ago

No comments yet