diff options
author | Matthias Kappeller <matthias.kappeller@brueckner.com> | 2021-02-15 15:08:44 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-02-20 20:07:11 +0000 |
commit | 67d236faed67e268d3a643218f8a7ba98b65322c (patch) | |
tree | d5ea99c1dab1251b0e9e83457d926952393fcbfe /sonar-plugin-api/src | |
parent | f0e865e19e2489c3f76d6612046de95741f7c64d (diff) | |
download | sonarqube-67d236faed67e268d3a643218f8a7ba98b65322c.tar.gz sonarqube-67d236faed67e268d3a643218f8a7ba98b65322c.zip |
Expose revision in PostProjectAnalysisTaskTester
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/ce/posttask/PostProjectAnalysisTaskTester.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/ce/posttask/PostProjectAnalysisTaskTester.java b/sonar-plugin-api/src/main/java/org/sonar/api/ce/posttask/PostProjectAnalysisTaskTester.java index 716cf702a72..96508381c4b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/ce/posttask/PostProjectAnalysisTaskTester.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/ce/posttask/PostProjectAnalysisTaskTester.java @@ -112,6 +112,8 @@ public class PostProjectAnalysisTaskTester { private Branch branch; private ScannerContext scannerContext; private String analysisUuid; + @Nullable + private String revision; @CheckForNull private Map<String, Object> stats; @@ -203,6 +205,14 @@ public class PostProjectAnalysisTaskTester { return this; } + /** + * @since 8.7 + */ + public PostProjectAnalysisTaskTester withRevision(@Nullable String revision) { + this.revision = revision; + return this; + } + public PostProjectAnalysisTask.ProjectAnalysis execute() { requireNonNull(ceTask, CE_TASK_CAN_NOT_BE_NULL); requireNonNull(project, PROJECT_CAN_NOT_BE_NULL); @@ -213,6 +223,7 @@ public class PostProjectAnalysisTaskTester { analysis = new AnalysisBuilder() .setDate(date) .setAnalysisUuid(analysisUuid) + .setRevision(revision) .build(); } @@ -245,6 +256,7 @@ public class PostProjectAnalysisTaskTester { public PostProjectAnalysisTask.ProjectAnalysis getProjectAnalysis() { return projectAnalysis; } + @Override public PostProjectAnalysisTask.LogStatistics getLogStatistics() { return logStatistics; |