aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-auth-gitlab
diff options
context:
space:
mode:
authorAntoine Vigneau <antoine.vigneau@sonarsource.com>2023-12-13 14:20:30 +0100
committersonartech <sonartech@sonarsource.com>2023-12-22 20:03:02 +0000
commit8ca93afc90cd2d3ccd149f270b6b887cb1668d2a (patch)
tree39214d313abb90db4b4872bcaae45d55f972a487 /server/sonar-auth-gitlab
parentd237a80b07c1a99151bb61f492ab27dfdfd65594 (diff)
downloadsonarqube-8ca93afc90cd2d3ccd149f270b6b887cb1668d2a.tar.gz
sonarqube-8ca93afc90cd2d3ccd149f270b6b887cb1668d2a.zip
SONAR-21244 Sync groups in Gitlab provisioning
Diffstat (limited to 'server/sonar-auth-gitlab')
-rw-r--r--server/sonar-auth-gitlab/src/main/java/org/sonar/auth/gitlab/GsonGroup.java14
-rw-r--r--server/sonar-auth-gitlab/src/test/java/org/sonar/auth/gitlab/GsonGroupTest.java1
2 files changed, 3 insertions, 12 deletions
diff --git a/server/sonar-auth-gitlab/src/main/java/org/sonar/auth/gitlab/GsonGroup.java b/server/sonar-auth-gitlab/src/main/java/org/sonar/auth/gitlab/GsonGroup.java
index 2fe325c2ab4..75dfaf80b43 100644
--- a/server/sonar-auth-gitlab/src/main/java/org/sonar/auth/gitlab/GsonGroup.java
+++ b/server/sonar-auth-gitlab/src/main/java/org/sonar/auth/gitlab/GsonGroup.java
@@ -35,18 +35,15 @@ public class GsonGroup {
private String id;
@SerializedName("full_path")
private String fullPath;
- @SerializedName("description")
- private String description;
public GsonGroup() {
// http://stackoverflow.com/a/18645370/229031
- this("", "", "");
+ this("", "");
}
- private GsonGroup(String id, String fullPath, String description) {
+ private GsonGroup(String id, String fullPath) {
this.id = id;
this.fullPath = fullPath;
- this.description = description;
}
public String getId() {
@@ -57,13 +54,8 @@ public class GsonGroup {
return fullPath;
}
- public String getDescription() {
- return description;
- }
-
static List<GsonGroup> parse(String json) {
- Type collectionType = new TypeToken<Collection<GsonGroup>>() {
- }.getType();
+ Type collectionType = new TypeToken<Collection<GsonGroup>>() {}.getType();
Gson gson = new Gson();
return gson.fromJson(json, collectionType);
}
diff --git a/server/sonar-auth-gitlab/src/test/java/org/sonar/auth/gitlab/GsonGroupTest.java b/server/sonar-auth-gitlab/src/test/java/org/sonar/auth/gitlab/GsonGroupTest.java
index b72f834c16e..6c354d65070 100644
--- a/server/sonar-auth-gitlab/src/test/java/org/sonar/auth/gitlab/GsonGroupTest.java
+++ b/server/sonar-auth-gitlab/src/test/java/org/sonar/auth/gitlab/GsonGroupTest.java
@@ -49,6 +49,5 @@ public class GsonGroupTest {
assertThat(groups.size()).isOne();
assertThat(groups.get(0).getId()).isEqualTo("123456789");
assertThat(groups.get(0).getFullPath()).isEqualTo("my-awesome-group/my-project");
- assertThat(groups.get(0).getDescription()).isEqualTo("toto");
}
}