@RequestMapping(value = "/{id}/scm/collaborators", method = RequestMethod.GET)
public String getCollaborators(@PathVariable Long id, Model model) {
Application app = applicationService.findOne(id);
// FIXME Currently assuming GitHub.
GitHubScm scm = (GitHubScm) app.getScm();
// TODO Would like to put this inside GitHubScm, but don't want to use Spring Social GitHub as the data model
// here since that is intended more for data transfer. We need to control the OJM/OXM here, and don't want
// changes to the Spring Social GitHub API to produce changes to our web service API. But I'm not necessarily
// excited about implementing that entire data model here. Considering options.
List<GitHubUser> collaborators = gitHub.repoOperations().getCollaborators(scm.getUser(), scm.getRepo());
List<List<GitHubUser>> collaboratorRows = ViewUtil.toRows(collaborators, 3);
model.addAttribute(app);
model.addAttribute("entity", app);
model.addAttribute("collaboratorList", collaborators);