Package inha.git.github.api.controller
Class GithubController
java.lang.Object
inha.git.github.api.controller.GithubController
GithubController는 github 관련 엔드포인트를 처리.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGithubRepositories
(User user) 사용자의 Github 레포지토리 목록을 조회합니다.getRepositoryContents
(User user, Integer projectIdx, String path) Github 레포지토리의 내용을 조회합니다.updateGithubToken
(User user, GitubTokenResquest gitubTokenResquest) Github Token을 갱신합니다.
-
Constructor Details
-
GithubController
public GithubController()
-
-
Method Details
-
updateGithubToken
@PutMapping("/token") public BaseResponse<String> updateGithubToken(@AuthenticationPrincipal User user, @Validated @RequestBody GitubTokenResquest gitubTokenResquest) Github Token을 갱신합니다.- Parameters:
user
- 사용자 정보gitubTokenResquest
- Github Token 갱신 요청 정보- Returns:
- 갱신 성공 메시지
-
getGithubRepositories
@GetMapping("/repositories") public BaseResponse<List<GithubRepositoryResponse>> getGithubRepositories(@AuthenticationPrincipal User user) 사용자의 Github 레포지토리 목록을 조회합니다.- Parameters:
user
- 사용자 정보- Returns:
- Github 레포지토리 목록
-
getRepositoryContents
@GetMapping("/repository/{projectIdx}") public BaseResponse<List<SearchFileResponse>> getRepositoryContents(@AuthenticationPrincipal User user, @PathVariable("projectIdx") Integer projectIdx, @RequestParam(value="path",required=false,defaultValue="/") String path) Github 레포지토리의 내용을 조회합니다.- Parameters:
user
- 사용자 정보projectIdx
- 프로젝트 인덱스path
- 조회할 경로- Returns:
- Github 레포지토리의 내용
-