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: string,
branchName: string
) {
const url = `${glab.baseUrl}/api/v4/projects/${projectId}/repository/branches/${branchName}`;
const issue = await fetch(`${url}`, {
headers: {
"Authorization": `Bearer: ${glab.token}`,
"Content-Type": "application/json",
}
});
return await issue.json();
}
Submitted by lplit 816 days ago
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: string,
branchName: string
) {
const url = `https://gitlab.com/api/v4/projects/${projectId}/repository/branches/${branchName}`;
const issue = await fetch(`${url}`, {
headers: {
"Authorization": `Bearer: ${glab.token}`,
"Content-Type": "application/json",
}
});
return await issue.json();
}
Submitted by lplit 854 days ago