debian-mirror-gitlab/spec/contracts/consumer/resources/api/pipeline_schedules.js
2022-08-27 11:52:29 +05:30

26 lines
557 B
JavaScript

import axios from 'axios';
export async function updatePipelineSchedule(endpoint) {
const { url } = endpoint;
return axios({
method: 'PUT',
baseURL: url,
url: '/gitlab-org/gitlab-qa/-/pipeline_schedules/25',
headers: {
Accept: '*/*',
'Content-Type': 'application/json; charset=utf-8',
},
data: {
schedule: {
description: 'bar',
cron: '0 1 * * *',
cron_timezone: 'UTC',
active: true,
},
},
validateStatus: (status) => {
return status === 302;
},
});
}