From be46fdae92760199df04ba7d6f251e6a91026f84 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Fri, 24 Apr 2020 14:47:41 +0200 Subject: [PATCH] SONAR-13297 Add new tutorials.jenkins.skipBitbucketPreReqs user setting key --- .../java/org/sonar/server/user/ws/SetSettingAction.java | 6 +++++- .../java/org/sonar/server/user/ws/SetSettingActionTest.java | 1 + .../org/sonarqube/ws/client/users/SetSettingRequest.java | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/SetSettingAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/SetSettingAction.java index 4b208c7ca2d..3ebcc785cd2 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/SetSettingAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/SetSettingAction.java @@ -57,7 +57,11 @@ public class SetSettingAction implements UsersWsAction { .setRequired(true) .setMaximumLength(100) .setDescription("Setting key") - .setPossibleValues("notifications.optOut", UserUpdater.NOTIFICATIONS_READ_DATE); + .setPossibleValues( + "tutorials.jenkins.skipBitbucketPreReqs", + "notifications.optOut", + UserUpdater.NOTIFICATIONS_READ_DATE + ); action.createParam(PARAM_VALUE) .setRequired(true) diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/SetSettingActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/SetSettingActionTest.java index 2dd0af8b413..1efe8b80fed 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/SetSettingActionTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/SetSettingActionTest.java @@ -124,6 +124,7 @@ public class SetSettingActionTest { tuple("value", true, 4000)); assertThat(definition.param("key").possibleValues()).containsExactlyInAnyOrder( + "tutorials.jenkins.skipBitbucketPreReqs", "notifications.optOut", "notifications.readDate"); } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SetSettingRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SetSettingRequest.java index e0e71dfac16..cfa48dd1342 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SetSettingRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SetSettingRequest.java @@ -49,6 +49,7 @@ public class SetSettingRequest { * This is a mandatory parameter. * Possible values: * -- 2.39.5