Skip to content

Commit

Permalink
Add transition issue method to SQ client, rename IssueTransition to m…
Browse files Browse the repository at this point in the history
…atch the convention
  • Loading branch information
georgii-borovinskikh-sonarsource committed Nov 21, 2023
1 parent 14247b0 commit a9eaa74
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/SonarQube.Client/ISonarQubeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,11 @@ Task<IList<SonarQubeNotification>> GetNotificationEventsAsync(string projectKey,
Task<ISSEStreamReader> CreateSSEStreamReader(string projectKey, CancellationToken token);

Task<IList<SonarQubeHotspotSearch>> SearchHotspotsAsync(string projectKey, string branch, CancellationToken token);

/// <summary>
/// Sets review status for an issue and adds an optional comment.
/// See api/issues/do_transition and api/issues/add_comment
/// </summary>
Task TransitionIssue(string issueKey, SonarQubeIssueTransition transition, string optionalComment, CancellationToken token);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace SonarQube.Client.Models
/// <summary>
/// Supported values for parameter `transition` of api/issues/do_transition
/// </summary>
public enum IssueTransition
public enum SonarQubeIssueTransition
{
FalsePositive,
WontFix,
Expand Down
6 changes: 6 additions & 0 deletions src/SonarQube.Client/SonarQubeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,12 @@ public async Task<IList<SonarQubeHotspotSearch>> SearchHotspotsAsync(string proj
},
token);

public Task TransitionIssue(string issueKey, SonarQubeIssueTransition transition, string optionalComment, CancellationToken token)
{
// no-op, will be implemented later
return Task.CompletedTask;
}

public async Task<IList<SonarQubeIssue>> GetTaintVulnerabilitiesAsync(string projectKey, string branch, CancellationToken token)
{
var issues = await InvokeCheckedRequestAsync<IGetTaintVulnerabilitiesRequest, SonarQubeIssue[]>(
Expand Down

0 comments on commit a9eaa74

Please sign in to comment.