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

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

27 lines
557 B
JavaScript
Raw Permalink Normal View History

2022-08-27 11:52:29 +05:30
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;
},
});
}