feat(gitlabclient): add deleteProject method to delete a project using GitLab API DELETE /api/v4/projects/:id
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-02-28 - 2.2.0 - feat(gitlabclient)
|
||||||
|
add deleteProject method to delete a project using GitLab API DELETE /api/v4/projects/:id
|
||||||
|
|
||||||
|
- Adds GitlabClient.deleteProject(projectId: number | string): Promise<void>.
|
||||||
|
- Implements DELETE /api/v4/projects/:id and URL-encodes the projectId.
|
||||||
|
- Non-breaking API addition — bump minor version.
|
||||||
|
|
||||||
## 2026-02-28 - 2.1.0 - feat(gitlab)
|
## 2026-02-28 - 2.1.0 - feat(gitlab)
|
||||||
add group- and project-management methods to GitLab client
|
add group- and project-management methods to GitLab client
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@apiclient.xyz/gitlab',
|
name: '@apiclient.xyz/gitlab',
|
||||||
version: '2.1.0',
|
version: '2.2.0',
|
||||||
description: 'A TypeScript client for the GitLab API, providing easy access to projects, groups, CI/CD variables, and pipelines.'
|
description: 'A TypeScript client for the GitLab API, providing easy access to projects, groups, CI/CD variables, and pipelines.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -368,4 +368,15 @@ export class GitLabClient {
|
|||||||
`/api/v4/projects/${encodeURIComponent(projectId)}/pipelines/${pipelineId}/cancel`,
|
`/api/v4/projects/${encodeURIComponent(projectId)}/pipelines/${pipelineId}/cancel`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Project Deletion
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public async deleteProject(projectId: number | string): Promise<void> {
|
||||||
|
await this.request(
|
||||||
|
'DELETE',
|
||||||
|
`/api/v4/projects/${encodeURIComponent(projectId)}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user