Skip to content

Commit

Permalink
Remove pullRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
nquinquenel committed Nov 27, 2024
1 parent c631cdd commit 565779d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
3 changes: 1 addition & 2 deletions API_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

* Signature of `org.sonarsource.sonarlint.core.rpc.protocol.backend.file.DidUpdateFileSystemParams#DidUpdateFileSystemParams` was changed
* Parameter `addedOrChangedFiles` was split into `addedFiles` and `changedFiles`
* Removed parameter `branch` from `org.sonarsource.sonarlint.core.rpc.protocol.client.issue.IssueDetailsDto` as it should not be used anymore by the client.
This is used as part of the Open in IDE feature, and SLCORE is now checking for branches.
* Removed parameter `branch` and `pullRequest` from `org.sonarsource.sonarlint.core.rpc.protocol.client.issue.IssueDetailsDto` as it should not be used anymore by the client.

# 10.10

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ ShowIssueParams getShowIssueParams(IssueApi.ServerIssueDetails issueDetails, Str
var isTaint = isIssueTaint(issueDetails.ruleKey);

return new ShowIssueParams(configScopeId, new IssueDetailsDto(textRangeDto, issueDetails.ruleKey, issueDetails.key, translation.serverToIdePath(issueDetails.path),
pullRequest, issueDetails.message, issueDetails.creationDate, issueDetails.codeSnippet, isTaint,
flowLocations));
issueDetails.message, issueDetails.creationDate, issueDetails.codeSnippet, isTaint, flowLocations));
}

static boolean isIssueTaint(String ruleKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ void it_should_open_an_issue_in_ide() throws Exception {
TextRangeDto::getEndLine, TextRangeDto::getEndLineOffset)
.contains(1, 0, 3, 4);
assertThat(issueDetails.getCodeSnippet()).isEqualTo("source\ncode\nfile");
assertThat(issueDetails.getPullRequest()).isNull();
}

@Test
Expand Down Expand Up @@ -199,7 +198,6 @@ void it_should_open_pr_issue_in_ide() throws IOException, InterruptedException {
TextRangeDto::getEndLine, TextRangeDto::getEndLineOffset)
.contains(1, 0, 3, 4);
assertThat(issueDetails.getCodeSnippet()).isEqualTo("source\ncode\nfile");
assertThat(issueDetails.getPullRequest()).isEqualTo("1234");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@

import java.nio.file.Path;
import java.util.List;
import javax.annotation.Nullable;
import org.sonarsource.sonarlint.core.rpc.protocol.common.FlowDto;
import org.sonarsource.sonarlint.core.rpc.protocol.common.TextRangeDto;

public class IssueDetailsDto {
private final String issueKey;
private final String ruleKey;
private final Path ideFilePath;
@Nullable
private final String pullRequest;
private final String message;
private final String creationDate;
private final String codeSnippet;
Expand All @@ -39,13 +36,12 @@ public class IssueDetailsDto {
private final TextRangeDto textRange;

public IssueDetailsDto(TextRangeDto textRange, String ruleKey, String issueKey,
Path ideFilePath, @Nullable String pullRequest, String message, String creationDate,
Path ideFilePath, String message, String creationDate,
String codeSnippet, boolean isTaint, List<FlowDto> flows) {
this.issueKey = issueKey;
this.ruleKey = ruleKey;
this.textRange = textRange;
this.ideFilePath = ideFilePath;
this.pullRequest = pullRequest;
this.message = message;
this.creationDate = creationDate;
this.codeSnippet = codeSnippet;
Expand Down Expand Up @@ -73,11 +69,6 @@ public Path getIdeFilePath() {
return ideFilePath;
}

@Nullable
public String getPullRequest() {
return pullRequest;
}

public String getCodeSnippet() {
return codeSnippet;
}
Expand Down

0 comments on commit 565779d

Please sign in to comment.