Skip to content
Snippets Groups Projects

feat: Update Gerrit response to use username instead of email

2 files
+ 6
7
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -120,19 +120,18 @@ public final class UserMetadataHelper {
@@ -120,19 +120,18 @@ public final class UserMetadataHelper {
}
}
/**
/**
* Builds a GerritResponse object given the desired count, email, and username. Constructs owner, reviewer, and account URLs.
* Builds a GerritResponse object given the desired count, and username. Constructs owner, reviewer, and account URLs.
*
*
* @param count The user review count.
* @param count The user review count.
* @param email The user email.
* @param username The username.
* @param username The username.
* @return A fully populated GerritResponse with all related URLs.
* @return A fully populated GerritResponse with all related URLs.
*/
*/
public GerritResponse buildGerritResponse(int count, String email, String username) {
public GerritResponse buildGerritResponse(int count, String username) {
return GerritResponse
return GerritResponse
.builder()
.builder()
.setMergedChangesCount(Integer.toString(count))
.setMergedChangesCount(Integer.toString(count))
.setGerritOwnerUrl(metadataConfig.url().gerritOwnerUrl() + email)
.setGerritOwnerUrl(metadataConfig.url().gerritOwnerUrl() + username)
.setGerritReviewerUrl(metadataConfig.url().gerritReviewerUrl() + email)
.setGerritReviewerUrl(metadataConfig.url().gerritReviewerUrl() + username)
.setAccountUrl(metadataConfig.url().applicationBaseUrl() + "account/profile/" + username)
.setAccountUrl(metadataConfig.url().applicationBaseUrl() + "account/profile/" + username)
.build();
.build();
}
}
Loading