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);
|
|
|
|
}
|