Skip to content
Snippets Groups Projects
Commit f31d3eea authored by michael.minelli's avatar michael.minelli
Browse files

GitlabManager => Add edit repo functions

parent b68861d9
No related branches found
No related tags found
Loading
......@@ -72,6 +72,16 @@ class GitlabManager {
return response.data;
}
async editRepository(repoId: number, newAttributes: Partial<GitlabRepository>): Promise<GitlabRepository> {
const response = await axios.put<GitlabRepository>(this.getApiUrl(GitlabRoutes.REPOSITORY_EDIT).replace('{{id}}', String(repoId)), newAttributes);
return response.data;
}
async changeRepositoryVisibility(repoId: number, visibility: GitlabVisibility): Promise<GitlabRepository> {
return await this.editRepository(repoId, { visibility: visibility.toString() });
}
async addRepositoryMember(repoId: number, userId: number, accessLevel: GitlabAccessLevel): Promise<GitlabMember> {
const response = await axios.post<GitlabMember>(this.getApiUrl(GitlabRoutes.REPOSITORY_MEMBER_ADD).replace('{{id}}', String(repoId)), {
user_id : userId,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment