Class RepositoryController

java.lang.Object
edu.ucsb.cs156.frontiers.controllers.ApiController
edu.ucsb.cs156.frontiers.controllers.RepositoryController

@RestController @RequestMapping("/api/repos") public class RepositoryController extends ApiController
  • Constructor Details

    • RepositoryController

      public RepositoryController()
  • Method Details

    • createRepos

      @PostMapping("/createRepos") @PreAuthorize("@CourseSecurity.hasManagePermissions(#root, #courseId)") public Job createRepos(@RequestParam Long courseId, @RequestParam String repoPrefix, @RequestParam Optional<Boolean> isPrivate, @RequestParam RepositoryPermissions permissions)
      Fires a job that creates a repo for every RosterStudent with a linked user with a GitHub account.
      Parameters:
      courseId - ID of course to create repos for
      repoPrefix - each repo created will begin with this prefix, followed by a dash and the student's GitHub username
      isPrivate - determines whether the repository being created is private
      Returns:
      the Job started to create the repos.