Skip to content

Delete note of a merge request #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions src/GitLabApiClient/IMergeRequestsClient.cs
Original file line number Diff line number Diff line change
@@ -91,6 +91,14 @@ public interface IMergeRequestsClient
/// <returns>Merge requests satisfying options.</returns>
Task<IList<Note>> GetNotesAsync(ProjectId projectId, int mergeRequestIid, Action<MergeRequestNotesQueryOptions> options = null);

/// <summary>
/// Deletes a note of a merge request.
/// </summary>
/// <param name="projectId">The ID, path or <see cref="Project"/> of the project.</param>
/// <param name="mergeRequestIid">Iid of the merge request.</param>
/// <param name="noteId">ID of the merge request note.</param>
Task DeleteNoteAsync(ProjectId projectId, int mergeRequestIid, int noteId);

/// <summary>
/// List erge request pipelines
/// </summary>
11 changes: 11 additions & 0 deletions src/GitLabApiClient/MergeRequestsClient.cs
Original file line number Diff line number Diff line change
@@ -150,6 +150,17 @@ public async Task<IList<Note>> GetNotesAsync(ProjectId projectId, int mergeReque
return await _httpFacade.GetPagedList<Note>(url);
}

/// <summary>
/// Deletes a note of a merge request.
/// </summary>
/// <param name="projectId">The ID, path or <see cref="Project"/> of the project.</param>
/// <param name="mergeRequestIid">Iid of the merge request.</param>
/// <param name="noteId">ID of the merge request note.</param>
public async Task DeleteNoteAsync(ProjectId projectId, int mergeRequestIid, int noteId)
{
await _httpFacade.Delete($"projects/{projectId}/merge_requests/{mergeRequestIid}/notes/{noteId}");
}

/// <summary>
/// List erge request pipelines
/// </summary>