엔지니어링

google Sheet에 Github Repo 정보 가져오기

당나귀🐴 2022. 4. 5. 02:43

google Sheet에 Github Repo 정보 가져오기

Import GitHub Data to Google Sheets 따라하기

  • 예제는 https://github.com/octocat/Hello-World/ 의 데이터를 사용
  • 업무에서 사용하는 레포지토리와 다른 점
    • 업무에서 활용하는 레포지토리는 Private로 되어 있음
    • Priavte 는 권한작업을 해줘야 할 것임
  • 세 가지 정보를 수집해보겠음
    • Repository Pull Request
    • Commit Messages in Pull Request
    • Raw Data related with Commit

Step 1) 빈 구글 시트 생성

image-20210103192901803

Step 2) Google Sheet Add-ons을 이용해서 API Connector 설치

  • Add-ons --> Get Add-ons --> API Connector install

imgimg

Step 3) API Connector 에서 GITHUB API 사용할 수 있도록 연결

  • Add-ons -> API Connector -> Manage Connections -> Github Connect

imgimgimgimg

Step 4) REQUEST API 생성

  • pull requests list
https://api.github.com/repos/octocat/hello-world/pulls
  • 특정 pull requests
https://api.github.com/repos/octocat/hello-world/pulls/796
  • 특정 pull requests 안에 있는 commit list
https://api.github.com/repos/octocat/hello-world/pulls/796/commits

Step 5) Github Data를 Sheet로 가져오기

  • Add-ons --> API Connector --> Open
  • Create 탭으로 가서 작성할 API에 대한 자료 입력
  • 총 30개의 REQUEST 에 대한 데이터를 저장함

imgimg

Step 6) Run !

img