String members;
@SerializedName("emails")
String emails;
+ @SerializedName("contents")
+ String contents;
- public Permissions(@Nullable String checks, @Nullable String members, @Nullable String emails) {
+ public Permissions(@Nullable String checks, @Nullable String members, @Nullable String emails, @Nullable String contents) {
this.checks = checks;
this.members = members;
this.emails = emails;
+ this.contents = contents;
}
public Permissions() {
public String getEmails() {
return emails;
}
+
+ @CheckForNull
+ public String getContents() {
+ return contents;
+ }
}
public static class GsonRepositorySearch {
ArgumentCaptor<GithubAppConfiguration> appConfigurationCaptor = ArgumentCaptor.forClass(GithubAppConfiguration.class);
GsonApp githubApp = mockGithubApp(appConfigurationCaptor);
- when(githubApp.getPermissions()).thenReturn(new Permissions(null, null, "read"));
+ when(githubApp.getPermissions()).thenReturn(new Permissions(null, null, "read", null));
mockOrganizations(appConfigurationCaptor, "org1", "org2");
ConfigCheckResult checkResult = configValidator.checkConfig();
private GsonApp mockGithubAppWithValidConfig(ArgumentCaptor<GithubAppConfiguration> appConfigurationCaptor) {
GsonApp githubApp = mock(GsonApp.class);
when(githubClient.getApp(appConfigurationCaptor.capture())).thenReturn(githubApp);
- when(githubApp.getPermissions()).thenReturn(new Permissions(null, "read", "read"));
+ when(githubApp.getPermissions()).thenReturn(new Permissions(null, "read", "read", null));
return githubApp;
}
private static GithubAppInstallation mockInstallationWithMembersPermission(String org) {
GithubAppInstallation installation = mockInstallation(org);
- when(installation.permissions()).thenReturn(new Permissions(null, "read", "read"));
+ when(installation.permissions()).thenReturn(new Permissions(null, "read", "read", null));
return installation;
}