2024-03-05 09:52:36 +00:00

40 lines
965 B
TypeScript

const fetchProjectDetails = async () => {
const response = await fetch(
"https://git.n.xiaomi.com/api/v4/projects/131366",
{
method: "GET",
headers: { "PRIVATE-TOKEN": "Zd1UASPcMwVox5tNS6ep" },
}
);
const body = await response.json();
console.log(body);
};
const fetchPipelineDetails = async () => {
const response = await fetch(
"https://git.n.xiaomi.com/api/v4/projects/131366/pipelines/7646046",
{
method: "GET",
headers: { "PRIVATE-TOKEN": "Zd1UASPcMwVox5tNS6ep" },
}
);
const body = await response.json();
console.log(body);
};
const fetchPipelines = async () => {
const response = await fetch(
"https://git.n.xiaomi.com/api/v4/projects/131366/pipelines",
{
method: "GET",
headers: { "PRIVATE-TOKEN": "Zd1UASPcMwVox5tNS6ep" },
}
);
const body = await response.json();
console.log(body);
};
// fetchPipelines();
// fetchPipelineDetails();
fetchProjectDetails();