Class GithubGraphQLController

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

@RequestMapping("/api/github/graphql/") @RestController public class GithubGraphQLController extends ApiController
  • Constructor Details

  • Method Details

    • getDefaultBranchName

      @PreAuthorize("@CourseSecurity.hasManagePermissions(#root, #courseId)") @GetMapping("defaultBranchName") public String getDefaultBranchName(Long courseId, String owner, String repo) throws Exception
      Return default branch name for a given repository.
      Parameters:
      courseId - the id of the course whose installation is being used for credentails
      owner - the owner of the repository
      repo - the name of the repository
      Returns:
      the default branch name
      Throws:
      Exception
    • getCommits

      @PreAuthorize("@CourseSecurity.hasManagePermissions(#root, #courseId)") @GetMapping("commits") public String getCommits(Long courseId, String owner, String repo, String branch, Integer first, @RequestParam(name="after",required=false) String after) throws Exception
      Return default branch name for a given repository.
      Parameters:
      courseId - the id of the course whose installation is being used for credentails
      owner - the owner of the repository
      repo - the name of the repository
      Returns:
      the default branch name
      Throws:
      Exception