debian-mirror-gitlab/spec/contracts/consumer/resources/api/project/merge_requests.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
869 B
JavaScript
Raw Normal View History

2022-08-27 11:52:29 +05:30
import axios from 'axios';
2022-07-23 23:45:48 +05:30
2022-08-27 11:52:29 +05:30
export async function getDiffsMetadata(endpoint) {
2022-07-23 23:45:48 +05:30
const { url } = endpoint;
2022-08-27 11:52:29 +05:30
return axios({
2022-07-23 23:45:48 +05:30
method: 'GET',
baseURL: url,
url: '/gitlab-org/gitlab-qa/-/merge_requests/1/diffs_metadata.json',
headers: { Accept: '*/*' },
}).then((response) => response.data);
}
2022-08-27 11:52:29 +05:30
export async function getDiscussions(endpoint) {
2022-07-23 23:45:48 +05:30
const { url } = endpoint;
2022-08-27 11:52:29 +05:30
return axios({
2022-07-23 23:45:48 +05:30
method: 'GET',
baseURL: url,
url: '/gitlab-org/gitlab-qa/-/merge_requests/1/discussions.json',
headers: { Accept: '*/*' },
}).then((response) => response.data);
}
2022-08-27 11:52:29 +05:30
export async function getDiffsBatch(endpoint) {
2022-07-23 23:45:48 +05:30
const { url } = endpoint;
2022-08-27 11:52:29 +05:30
return axios({
2022-07-23 23:45:48 +05:30
method: 'GET',
baseURL: url,
url: '/gitlab-org/gitlab-qa/-/merge_requests/1/diffs_batch.json?page=0',
headers: { Accept: '*/*' },
}).then((response) => response.data);
}