Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Newtonsoft.Json;

namespace GitLabApiClient.Models.Projects.Requests
{
public class TransferProjectRequest
{
/// <summary>
/// The ID or path of the namespace to transfer to project to
/// </summary>
[JsonProperty("namespace")]
public string NameSpace { get; set; }
}
}
8 changes: 7 additions & 1 deletion src/GitLabApiClient/ProjectsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task<Project> GetAsync(int projectId) =>
await _httpFacade.Get<Project>($"projects/{projectId}");

/// <summary>
/// Get a list of visible projects for authenticated user.
/// Get a list of visible projects for authenticated user.
/// When accessed without authentication, only public projects are returned.
/// </summary>
/// <param name="options">Query options.</param>
Expand Down Expand Up @@ -190,5 +190,11 @@ public async Task ArchiveAsync(int id) =>
/// <param name="id">Id of the project.</param>
public async Task UnArchiveAsync(int id) =>
await _httpFacade.Post($"projects/{id}/unarchive");

public async Task<Project> Transfer(string id, TransferProjectRequest request)
{
Guard.NotNull(request, nameof(request));
return await _httpFacade.Put<Project>($"projects/{id}/transfer", request);
}
}
}