Skip to content

Add permanently_remove support to project delete#1110

Merged
louis-z merged 5 commits into
mainfrom
feature/project-permanently-remove
Jul 2, 2026
Merged

Add permanently_remove support to project delete#1110
louis-z merged 5 commits into
mainfrom
feature/project-permanently-remove

Conversation

@msrouchou

Copy link
Copy Markdown
Contributor

Exposes the permanently_remove and full_path query parameters on IProjectClient.DeleteAsync, matching the GitLab API behavior where v18+ soft-deletes by default and requires an explicit flag to bypass the grace period.

https://docs.gitlab.com/api/projects/#delete-a-project

@msrouchou msrouchou requested a review from a team as a code owner June 25, 2026 21:20
@msrouchou msrouchou requested review from louis-z and removed request for a team and louis-z June 25, 2026 21:20
Exposes the permanently_remove and full_path query parameters on
IProjectClient.DeleteAsync, matching the GitLab API behavior where
v18+ soft-deletes by default and requires an explicit flag to bypass
the grace period.

https://docs.gitlab.com/api/projects/#delete-a-project
@louis-z louis-z force-pushed the feature/project-permanently-remove branch from bc5b29c to 065b10c Compare June 30, 2026 11:51
Comment thread NGitLab.Mock.Tests/ProjectsMockTests.cs Outdated
Comment thread NGitLab.Mock.Tests/ProjectsMockTests.cs
Comment thread NGitLab.Mock.Tests/ProjectsMockTests.cs
Comment thread NGitLab.Mock.Tests/ProjectsMockTests.cs
Comment thread NGitLab/Impl/ProjectClient.cs Outdated
- Rename test method to DeleteAsync_WhenProjectExists_MarksProjectForDeletion
- Add comment explaining the mock sets MarkedForDeletionOn to UtcNow
- Clarify soft-delete setup steps in tests (required by GitLab before permanently_remove)
- Use Utils.AddParameter for full_path query param (consistent with permanently_remove)
- Add PermanentlyDeleteAsync wrapper that handles the two-step sequence internally,
  re-fetching PathWithNamespace after soft-delete to account for GitLab renaming the project

Co-Authored-By: Claude <noreply@anthropic.com>
@louis-z louis-z merged commit 22c876f into main Jul 2, 2026
7 checks passed
@louis-z louis-z deleted the feature/project-permanently-remove branch July 2, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants