/**
* edit workspace git sync settings
*
*/
export async function main(
workspace: string,
body: {
git_sync_settings?: {
include_path?: string[];
include_type?: (
| "script"
| "flow"
| "app"
| "folder"
| "resource"
| "variable"
| "secret"
| "resourcetype"
| "schedule"
)[];
repositories?: {
script_path: string;
git_repo_resource_path: string;
use_individual_branch?: boolean;
exclude_types_override?: (
| "script"
| "flow"
| "app"
| "folder"
| "resource"
| "variable"
| "secret"
| "resourcetype"
| "schedule"
)[];
[k: string]: unknown;
}[];
[k: string]: unknown;
};
[k: string]: unknown;
}
) {
const url = new URL(
`${BASE_URL}/api/w/${workspace}/workspaces/edit_git_sync_config`
);
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + WM_TOKEN,
},
body: JSON.stringify(body),
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 370 days ago
/**
* edit workspace git sync settings
*
*/
export async function main(
workspace: string,
body: {
git_sync_settings?: {
include_path?: string[];
include_type?: (
| "script"
| "flow"
| "app"
| "folder"
| "resource"
| "variable"
| "secret"
| "resourcetype"
| "schedule"
)[];
repositories?: {
script_path: string;
git_repo_resource_path: string;
use_individual_branch?: boolean;
exclude_types_override?: (
| "script"
| "flow"
| "app"
| "folder"
| "resource"
| "variable"
| "secret"
| "resourcetype"
| "schedule"
)[];
[k: string]: unknown;
}[];
[k: string]: unknown;
};
[k: string]: unknown;
}
) {
const url = new URL(
`${BASE_URL}/api/w/${workspace}/workspaces/edit_git_sync_config`
);
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + WM_TOKEN,
},
body: JSON.stringify(body),
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 797 days ago