]> source.dussan.org Git - sonarqube.git/commitdiff
Revert "SONAR-11626 Make set/unset_baseline internal"
authorJanos Gyerik <janos.gyerik@sonarsource.com>
Thu, 7 Mar 2019 15:35:51 +0000 (16:35 +0100)
committerSonarTech <sonartech@sonarsource.com>
Tue, 19 Mar 2019 19:21:26 +0000 (20:21 +0100)
This reverts commit edfade01ea94fffa9802bd8d13f9455b13878611.

server/sonar-server/src/main/java/org/sonar/server/projectanalysis/ws/SetBaselineAction.java
server/sonar-server/src/main/java/org/sonar/server/projectanalysis/ws/UnsetBaselineAction.java
server/sonar-server/src/test/java/org/sonar/server/projectanalysis/ws/SetBaselineActionTest.java
server/sonar-server/src/test/java/org/sonar/server/projectanalysis/ws/UnsetBaselineActionTest.java
sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java

index b4e38d51182ef1e52b9b1c9da76e05854bf5d5a3..981cf8659f0b57b4e761fe68e89c8fccaa4daeec 100644 (file)
@@ -67,7 +67,6 @@ public class SetBaselineAction implements ProjectAnalysesWsAction {
         "  <li>'Administer' rights on the specified project</li>" +
         "</ul>")
       .setSince("7.7")
-      .setInternal(true)
       .setPost(true)
       .setHandler(this);
 
index 3cdb4bddbfc9e57d7e2c8276aff1490844990181..869f434f2bc8f054d0f44328322dfd01701e5864 100644 (file)
@@ -64,7 +64,6 @@ public class UnsetBaselineAction implements ProjectAnalysesWsAction {
         "</ul>")
       .setSince("7.7")
       .setPost(true)
-      .setInternal(true)
       .setHandler(this);
 
     action.createParam(PARAM_PROJECT)
index 20982e2f6bdbe1503d0003531ca38d01854693d9..418d3121172a0f9858fb676d9102d94d946afd4d 100644 (file)
@@ -268,7 +268,7 @@ public class SetBaselineActionTest {
     assertThat(definition.isPost()).isTrue();
     assertThat(definition.key()).isEqualTo("set_baseline");
     assertThat(definition.since()).isEqualTo("7.7");
-    assertThat(definition.isInternal()).isTrue();
+    assertThat(definition.isInternal()).isFalse();
   }
 
   private void logInAsProjectAdministrator(ComponentDto project) {
index 5e0e057a5bd8584695646f7a72202b18467bbaac..d99009ee5b86fc126f16204ed32466b3c6b66c95 100644 (file)
@@ -256,7 +256,7 @@ public class UnsetBaselineActionTest {
     assertThat(definition.isPost()).isTrue();
     assertThat(definition.key()).isEqualTo("unset_baseline");
     assertThat(definition.since()).isEqualTo("7.7");
-    assertThat(definition.isInternal()).isTrue();
+    assertThat(definition.isInternal()).isFalse();
   }
 
   private void logInAsProjectAdministrator(ComponentDto project) {
index 52978ab95615ca24be6d46ab76d56fcc9ee548af..ef9617271ca9b129f937a024c83e10893de42dbc 100644 (file)
@@ -151,6 +151,7 @@ public class CorePropertyDefinitions {
           "<li>'previous_version' to compare to the previous version in the project history</li>" +
           "<li>A version, for example '1.2' or 'BASELINE'</li></ul>" +
           "<p>When specifying a number of days or a date, the snapshot selected for comparison is the first one available inside the corresponding time range. </p>" +
+          "<p>This property has no effect when a baseline is manually set on a long-living branch, such as the main branch.<p/>" +
           "<p>Changing this property only takes effect after subsequent project inspections.<p/>")
         .defaultValue(DEFAULT_LEAK_PERIOD)
         .category(CoreProperties.CATEGORY_GENERAL)