간단한 get 테스트 https://github.com/sypark9646/springGithubAPITest/tree/main/demo
base URL: https://api.github.com/
Header - Authorization: token {token} ⇒ Optional
GET /repos/{userId}/{repoName}: repo info
//예시 - https://api.github.com/repos/Yapp-17th/Android_2_Backend
{
"**id**": 283999126, //레포의 id => pk로 활용가능할듯. 이 값으로 저장된 toy가 있으면 에러 반환
"node_id": "MDEwOlJlcG9zaXRvcnkyODM5OTkxMjY=",
"name": "Android_2_Backend",
"full_name": "Yapp-17th/Android_2_Backend",
"private": false, // private이면 404 가 뜬다. => 예외처리 필요
"owner": {
"login": "Yapp-17th", // 레포의 주인 이름 (organization, user)
"id": 69037013,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjY5MDM3MDEz",
"avatar_url": "https://avatars.githubusercontent.com/u/69037013?v=4", //레포의 아바타 이미지
"gravatar_id": "",
"url": "https://api.github.com/users/Yapp-17th",
"html_url": "https://github.com/Yapp-17th",
"followers_url": "https://api.github.com/users/Yapp-17th/followers",
"following_url": "https://api.github.com/users/Yapp-17th/following{/other_user}",
"gists_url": "https://api.github.com/users/Yapp-17th/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Yapp-17th/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Yapp-17th/subscriptions",
"organizations_url": "https://api.github.com/users/Yapp-17th/orgs",
"repos_url": "https://api.github.com/users/Yapp-17th/repos",
"events_url": "https://api.github.com/users/Yapp-17th/events{/privacy}",
"received_events_url": "https://api.github.com/users/Yapp-17th/received_events",
"type": "Organization",
"site_admin": false
},
"html_url": "https://github.com/Yapp-17th/Android_2_Backend",
"description": "Backend Repository for Android Team 2",
"fork": false,
"url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend",
"forks_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/forks",
"keys_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/teams",
"hooks_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/hooks",
"issue_events_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/issues/events{/number}",
"events_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/events",
"assignees_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/assignees{/user}",
"branches_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/branches{/branch}",
"tags_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/tags",
"blobs_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/statuses/{sha}",
"languages_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/languages",
"stargazers_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/stargazers",
"contributors_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/contributors", // 들어가보면 기여자가 다 나옴, 우리가 생각했던 collaborator 느낌
"subscribers_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/subscribers",
"subscription_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/subscription",
"commits_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/contents/{+path}",
"compare_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/merges",
"archive_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/downloads",
"issues_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/issues{/number}",
"pulls_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/pulls{/number}",
"milestones_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/milestones{/number}",
"notifications_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/labels{/name}",
"releases_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/releases{/id}",
"deployments_url": "https://api.github.com/repos/Yapp-17th/Android_2_Backend/deployments",
"created_at": "2020-07-31T09:45:41Z",
"updated_at": "2021-01-18T16:36:25Z",
"pushed_at": "2021-01-18T16:36:27Z",
"git_url": "git://github.com/Yapp-17th/Android_2_Backend.git",
"ssh_url": "[email protected]:Yapp-17th/Android_2_Backend.git",
"clone_url": "https://github.com/Yapp-17th/Android_2_Backend.git",
"svn_url": "https://github.com/Yapp-17th/Android_2_Backend",
"homepage": "https://github.com/Yapp-17th/Android_2_Backend/wiki",
"size": 812,
"stargazers_count": 2,
"watchers_count": 2,
"language": "Java",
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 2,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 8,
"license": null,
"forks": 2,
"open_issues": 8,
"watchers": 2,
"default_branch": "develop",
"temp_clone_token": null,
"organization": {
"login": "Yapp-17th",
"id": 69037013,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjY5MDM3MDEz",
"avatar_url": "https://avatars.githubusercontent.com/u/69037013?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Yapp-17th",
"html_url": "https://github.com/Yapp-17th",
"followers_url": "https://api.github.com/users/Yapp-17th/followers",
"following_url": "https://api.github.com/users/Yapp-17th/following{/other_user}",
"gists_url": "https://api.github.com/users/Yapp-17th/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Yapp-17th/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Yapp-17th/subscriptions",
"organizations_url": "https://api.github.com/users/Yapp-17th/orgs",
"repos_url": "https://api.github.com/users/Yapp-17th/repos",
"events_url": "https://api.github.com/users/Yapp-17th/events{/privacy}",
"received_events_url": "https://api.github.com/users/Yapp-17th/received_events",
"type": "Organization",
"site_admin": false
},
"network_count": 2,
"subscribers_count": 2
}
GET /repos/{owner}/{repo}/collaborators
{
"message": "Must have push access to view repository collaborators.",
"documentation_url": "https://docs.github.com/rest/reference/repos#list-repository-collaborators"
}
확인 결과 collaborator은 레포 push 권한이 있어야 확인 가능합니다.
https://stackoverflow.com/a/40987268/11285469 - 우회 방법이라고 하는데 안되네요ㅠㅠ
GET /issues/show_menu_content?partial=issues/filters/authors_content
아쉬운대로 컨트리뷰터 정보라도 가져오는건 확인했는데 이건 잘 됩니다!
GET /repos/{owner}/{repo}/contributors: contributors info
[
{"login":"dnjscksdn98",
"id":59077132,
"node_id":"MDQ6VXNlcjU5MDc3MTMy",
"avatar_url":"https://avatars.githubusercontent.com/u/59077132?v=4",
"gravatar_id":"","url":"https://api.github.com/users/dnjscksdn98",
"html_url":"https://github.com/dnjscksdn98",
"followers_url":"https://api.github.com/users/dnjscksdn98/followers",
"following_url":"https://api.github.com/users/dnjscksdn98/following{/other_user}",
"gists_url":"https://api.github.com/users/dnjscksdn98/gists{/gist_id}",
"starred_url":"https://api.github.com/users/dnjscksdn98/starred{/owner}{/repo}",
"subscriptions_url":"https://api.github.com/users/dnjscksdn98/subscriptions",
"organizations_url":"https://api.github.com/users/dnjscksdn98/orgs",
"repos_url":"https://api.github.com/users/dnjscksdn98/repos",
"events_url":"https://api.github.com/users/dnjscksdn98/events{/privacy}",
"received_events_url":"https://api.github.com/users/dnjscksdn98/received_events",
"type":"User",
"site_admin":false,
"contributions":161},
{"login":"sypark9646",
...
}
]