zhaoyingbo a9fbe4cdb4
Some checks failed
CI Monitor MIflow / build-image (push) Failing after 36s
ci: 更新Dockerfile
2024-08-09 08:03:52 +00:00

21 lines
524 B
TypeScript

import netTool from "../netTool"
import { GITLAB_AUTH_HEADER, GITLAB_BASE_URL, gitlabReqWarp } from "./tools"
const getDiffs = async (project_id: number, merge_request_iid: number) => {
const URL = `${GITLAB_BASE_URL}/projects/${project_id}/merge_requests/${merge_request_iid}/changes`
const res = await gitlabReqWarp(
() => netTool.get(URL, {}, GITLAB_AUTH_HEADER),
null
)
if (res === null) return null
return res
}
const mr = {
getDiffs,
}
export default mr
getDiffs(139032, 484).then(console.log)