debian-mirror-gitlab/spec/contracts/consumer/endpoints/project/merge_requests.js
2022-07-23 20:15:48 +02:00

34 lines
863 B
JavaScript

import { request } from 'axios';
export function getDiffsMetadata(endpoint) {
const { url } = endpoint;
return request({
method: 'GET',
baseURL: url,
url: '/gitlab-org/gitlab-qa/-/merge_requests/1/diffs_metadata.json',
headers: { Accept: '*/*' },
}).then((response) => response.data);
}
export function getDiscussions(endpoint) {
const { url } = endpoint;
return request({
method: 'GET',
baseURL: url,
url: '/gitlab-org/gitlab-qa/-/merge_requests/1/discussions.json',
headers: { Accept: '*/*' },
}).then((response) => response.data);
}
export function getDiffsBatch(endpoint) {
const { url } = endpoint;
return request({
method: 'GET',
baseURL: url,
url: '/gitlab-org/gitlab-qa/-/merge_requests/1/diffs_batch.json?page=0',
headers: { Accept: '*/*' },
}).then((response) => response.data);
}