0

Check helm repository configuration is correct

by
Published Oct 17, 2025
Script qovery Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Check helm repository configuration is correct
4
 *
5
 */
6
export async function main(auth: RT.Qovery, environmentId: string, body: Body) {
7
	const url = new URL(`https://api.qovery.com/environment/${environmentId}/checkHelmRepository`)
8

9
	const response = await fetch(url, {
10
		method: 'POST',
11
		headers: {
12
			'Content-Type': 'application/json',
13
			Authorization: 'Token ' + auth.apiKey
14
		},
15
		body: JSON.stringify(body)
16
	})
17
	if (!response.ok) {
18
		const text = await response.text()
19
		throw new Error(`${response.status} ${text}`)
20
	}
21
	return await response.json()
22
}
23

24
/* eslint-disable */
25
/**
26
 * This file was automatically generated by json-schema-to-typescript.
27
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
28
 * and run json-schema-to-typescript to regenerate this file.
29
 */
30

31
export interface Body {
32
	git_repository: {
33
		/**
34
		 * application git repository URL
35
		 */
36
		url: string
37
		/**
38
		 * Name of the branch to use. This is optional
39
		 * If not specified, then the branch used is the `main` or `master` one
40
		 *
41
		 */
42
		branch?: string
43
		/**
44
		 * indicates the root path of the application.
45
		 */
46
		root_path?: string
47
		/**
48
		 * The git token id on Qovery side
49
		 */
50
		git_token_id?: string
51
		[k: string]: unknown
52
	}
53
	[k: string]: unknown
54
}
55