Examples of GitHubScm


Examples of org.zkybase.model.GitHubScm

  @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);
View Full Code Here

Examples of org.zkybase.model.GitHubScm

  @RequestMapping(value = "/{id}/scm/commits", method = RequestMethod.GET)
  public String getCommits(@PathVariable Long id, Model model) {
    Application app = applicationService.findOne(id);
   
    // FIXME Currently assuming GitHub.
    GitHubScm scm = (GitHubScm) app.getScm();
    List<GitHubCommit> commits = gitHub.repoOperations().getCommits(scm.getUser(), scm.getRepo());
   
    model.addAttribute(app);
    model.addAttribute("entity", app);
    model.addAttribute("commitList", commits);
   
View Full Code Here

Examples of org.zkybase.model.GitHubScm

  @RequestMapping(value = "/{id}/scm/downloads", method = RequestMethod.GET)
  public String getDownloads(@PathVariable Long id, Model model) {
    Application app = applicationService.findOne(id);
   
    // FIXME Currently assuming GitHub.
    GitHubScm scm = (GitHubScm) app.getScm();
    List<GitHubDownload> downloads = gitHub.repoOperations().getDownloads(scm.getUser(), scm.getRepo());
   
    model.addAttribute(app);
    model.addAttribute("entity", app);
    model.addAttribute("downloadList", downloads);
   
View Full Code Here

Examples of org.zkybase.model.GitHubScm

  @RequestMapping(value = "/{id}/scm/watchers", method = RequestMethod.GET)
  public String getWatchers(@PathVariable Long id, Model model) {
    Application app = applicationService.findOne(id);
   
    // FIXME Currently assuming GitHub.
    GitHubScm scm = (GitHubScm) app.getScm();
    String user = scm.getUser();
    String repo = scm.getRepo();
    List<GitHubUser> watchers = gitHub.repoOperations().getWatchers(user, repo);
    List<List<GitHubUser>> watcherRows = ViewUtil.toRows(watchers, 3);
   
    model.addAttribute(app);
    model.addAttribute("entity", app);
View Full Code Here

Examples of org.zkybase.model.GitHubScm

  @RequestMapping(value = "/{id}/scm/hooks", method = RequestMethod.GET)
  public String getHooks(@PathVariable Long id, Model model) {
    Application app = applicationService.findOne(id);
   
    // FIXME Currently assuming GitHub.
    GitHubScm scm = (GitHubScm) app.getScm();
    String user = scm.getUser();
    String repo = scm.getRepo();
    List<GitHubHook> hooks = applicationService.findHooks(user, repo);
   
    model.addAttribute(app);
    model.addAttribute("hookList", hooks);
    model.addAttribute("entity", app);
View Full Code Here

Examples of org.zkybase.model.GitHubScm

  public Application findOneWithScm(Long id) {
    notNull(id);
   
    // Main data comes from app repo
    Application app = applicationRepository.findOne(id);
    GitHubScm scm = app.getScm();
   
    // Supporting data comes from GitHub
    // FIXME This web service call shouldn't be part of the transaction
    GitHubRepo repo = gitHub().repoOperations().getRepo(scm.getUser(), scm.getRepo());
    scm.setId(repo.getId());
    scm.setName(repo.getName());
    scm.setDescription(repo.getDescription());
    scm.setUrl(repo.getUrl());
    scm.setHtmlUrl(repo.getHtmlUrl());
    scm.setGitUrl(repo.getGitUrl());
    scm.setSshUrl(repo.getSshUrl());
    scm.setSvnUrl(repo.getSvnUrl());
   
    return app;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.