debian-mirror-gitlab/qa/contracts/consumer/endpoints/merge_request.js

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

43 lines
822 B
JavaScript
Raw Normal View History

2022-05-07 20:08:51 +05:30
'use strict';
const axios = require('axios');
exports.getMetadata = (endpoint) => {
const url = endpoint.url;
return axios
.request({
method: 'GET',
baseURL: url,
url: '/diffs_metadata.json',
headers: { Accept: '*/*' },
})
.then((response) => response.data);
};
exports.getDiscussions = (endpoint) => {
const url = endpoint.url;
return axios
.request({
method: 'GET',
baseURL: url,
url: '/discussions.json',
headers: { Accept: '*/*' },
})
.then((response) => response.data);
};
exports.getDiffs = (endpoint) => {
const url = endpoint.url;
return axios
.request({
method: 'GET',
baseURL: url,
url: '/diffs_batch.json?page=0',
headers: { Accept: '*/*' },
})
.then((response) => response.data);
};