use of com.meisolsson.githubsdk.model.payload.TeamAddPayload in project PocketHub by pockethub.
the class IconAndViewTextManager method formatTeamAdd.
void formatTeamAdd(GitHubEvent event, StyledText main, StyledText details) {
boldActor(main, event);
main.append(" added ");
TeamAddPayload payload = (TeamAddPayload) event.payload();
Repository repo = payload.repository();
String repoName = repo != null ? repo.name() : null;
if (repoName != null) {
main.bold(repoName);
}
main.append(" to team");
Team team = payload.team();
String teamName = team != null ? team.name() : null;
if (teamName != null) {
main.append(' ').bold(teamName);
}
}
use of com.meisolsson.githubsdk.model.payload.TeamAddPayload in project PocketHub by pockethub.
the class NewsEventTextTest method testTeamAdd.
/**
* Verify text of push event
*/
@UiThreadTest
public void testTeamAdd() {
Team team = Team.builder().name("t1").build();
Repository repo = Repository.builder().name("r2").build();
TeamAddPayload payload = TeamAddPayload.builder().repository(repo).team(team).build();
GitHubEvent event = createEvent(GitHubEventType.TeamAddEvent, payload);
updateView(event);
verify("user added r2 to team t1");
}
Aggregations