Run in Apifox
When you pass the scarlet-witch-preview
media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file. The parent
and source
objects are present when the repository is a fork. parent
is the repository this repository was forked from, source
is the ultimate source for the network.
curl --location --request GET 'https://api.github.com/repos//'
请求参数 在 Header 添加参数 Authorization
,其值为在 Bearer 之后拼接 Token 示例: Authorization: Bearer ********************
返回响应
allow_merge_commit
boolean
可选 allow_rebase_merge
boolean
可选 allow_squash_merge
boolean
可选 anonymous_access_enabled
boolean
可选 Whether anonymous git access is allowed.
示例值: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}
示例值: http://api.github.com/repos/octocat/Hello-World/assignees{/user}
示例值: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}
示例值: http://api.github.com/repos/octocat/Hello-World/branches{/branch}
示例值: https://github.com/octocat/Hello-World.git
code_of_conduct
object (Code Of Conduct Simple)
可选
html_url
string <uri> | null
必需 示例值: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
示例值: citizen_code_of_conduct
示例值: Citizen Code of Conduct
示例值: https://api.github.com/repos/github/docs/community/code_of_conduct
示例值: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}
示例值: http://api.github.com/repos/octocat/Hello-World/comments{/number}
示例值: http://api.github.com/repos/octocat/Hello-World/commits{/sha}
示例值: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}
示例值: http://api.github.com/repos/octocat/Hello-World/contents/{+path}
contributors_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/contributors
created_at
string <date-time>
必需 delete_branch_on_merge
boolean
可选 deployments_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/deployments
示例值: This your first repo!
Returns whether or not this repository disabled.
downloads_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/downloads
示例值: http://api.github.com/repos/octocat/Hello-World/events
示例值: http://api.github.com/repos/octocat/Hello-World/forks
示例值: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}
示例值: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}
示例值: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}
示例值: git:github.com/octocat/Hello-World.git
has_advanced_security
boolean
可选 homepage
string <uri> | null
必需 示例值: http://api.github.com/repos/octocat/Hello-World/hooks
示例值: https://github.com/octocat/Hello-World
示例值: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}
示例值: http://api.github.com/repos/octocat/Hello-World/issues/events{/number}
示例值: http://api.github.com/repos/octocat/Hello-World/issues{/number}
示例值: http://api.github.com/repos/octocat/Hello-World/keys{/key_id}
示例值: http://api.github.com/repos/octocat/Hello-World/labels{/name}
languages_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/languages
示例值: http://api.github.com/repos/octocat/Hello-World/merges
示例值: http://api.github.com/repos/octocat/Hello-World/milestones{/number}
mirror_url
string <uri> | null
必需 示例值: git:git.example.com/octocat/Hello-World
示例值: MDEwOlJlcG9zaXRvcnkxMjk2MjY5
示例值: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}
owner
object (Simple User) | null
必需
示例值: https://github.com/images/error/octocat_happy.gif
示例值: https://api.github.com/users/octocat/events{/privacy}
followers_url
string <uri>
必需 示例值: https://api.github.com/users/octocat/followers
示例 值: https://api.github.com/users/octocat/following{/other_user}
示例值: https://api.github.com/users/octocat/gists{/gist_id}
示例值: 41d064eb2195891e12d0413f63227ea7
示例值: https://github.com/octocat
organizations_url
string <uri>
必需 示例值: https://api.github.com/users/octocat/orgs
received_events_url
string <uri>
必需 示例值: https://api.github.com/users/octocat/received_events
示例值: https://api.github.com/users/octocat/repos
示例值: "2020-07-09T00:17:55Z"
示例值: https://api.github.com/users/octocat/starred{/owner}{/repo}
subscriptions_url
string <uri>
必需 示例值: https://api.github.com/users/octocat/subscriptions
示例值: https://api.github.com/users/octocat
parent
object (Repository)
可选
allow_merge_commit
boolean
可选 Whether to allow merge commits for pull requests.
allow_rebase_merge
boolean
可选 Whether to allow rebase merges for pull requests.
allow_squash_merge
boolean
可选 Whether to allow squash merges for pull requests.
示例值: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}
Whether the repository is archived.
示例值: http://api.github.com/repos/octocat/Hello-World/assignees{/user}
示例值: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}
示例值: http://api.github.com/repos/octocat/Hello-World/branches{/branch}
示例值: https://github.com/octocat/Hello-World.git
示例值: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}
示例值: http://api.github.com/repos/octocat/Hello-World/comments{/number}
示例值: http://api.github.com/repos/octocat/Hello-World/commits{/sha}
示例值: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}
示例值: http://api.github.com/repos/octocat/Hello-World/contents/{+path}
contributors_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/contributors
created_at
string <date-time> | null
必需
The default branch of the repository.
delete_branch_on_merge
boolean
可选 Whether to delete head branches when pull requests are merged
deployments_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/deployments
示例值: This your first repo!
Returns whether or not this repository disabled.
downloads_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/downloads
示例值: http://api.github.com/repos/octocat/Hello-World/events
示例值: http://api.github.com/repos/octocat/Hello-World/forks
示例值: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}
示例值: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}
示例值: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}
示例值: git:github.com/octocat/Hello-World.git
Whether downloads are enabled.
Whether issues are enabled.
Whether projects are enabled.
Whether the wiki is enabled.
homepage
string <uri> | null
必需
示例值: http://api.github.com/repos/octocat/Hello-World/hooks
示例值: https://github.com/octocat/Hello-World
Unique identifier of the repository
Whether this repository acts as a template that can be used to generate new repositories.
示例值: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}
示例值: http://api.github.com/repos/octocat/Hello-World/issues/events{/number}
示例值: http://api.github.com/repos/octocat/Hello-World/issues{/number}
示例值: http://api.github.com/repos/octocat/Hello-World/keys{/key_id}
示例值: http://api.github.com/repos/octocat/Hello-World/labels{/name}
languages_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/languages
示例值: http://api.github.com/repos/octocat/Hello-World/merges
示例值: http://api.github.com/repos/octocat/Hello-World/milestones{/number}
mirror_url
string <uri> | null
必需 示例值: git:git.example.com/octocat/Hello-World
The name of the repository.
示例值: MDEwOlJlcG9zaXRvcnkxMjk2MjY5
示例值: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}
Whether the repository is private or public.
示例值: http://api.github.com/repos/octocat/Hello-World/pulls{/number}
pushed_at
string <date-time> | null
必需
示例值: http://api.github.com/repos/octocat/Hello-World/releases{/id}
示例值: git@github.com:octocat/Hello-World.git
stargazers_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/stargazers
示例值: "2020-07-09T00:17:42Z"
示例值: http://api.github.com/repos/octocat/Hello-World/statuses/{sha}
subscribers_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/subscribers
subscription_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/subscription
示例值: https://svn.github.com/octocat/Hello-World
示例值: http://api.github.com/repos/octocat/Hello-World/tags
示例值: http://api.github.com/repos/octocat/Hello-World/teams
template_repository
object | null
可选
示例值: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}
updated_at
string <date-time> | null
必需
示例值: https://api.github.com/repos/octocat/Hello-World
The repository visibility: public, private, or internal.
示例值: http://api.github.com/repos/octocat/Hello-World/pulls{/number}
pushed_at
string <date-time>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/releases{/id}
source
object (Repository)
可选 示例值: git@github.com:octocat/Hello-World.git
stargazers_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/stargazers
示例值: http://api.github.com/repos/octocat/Hello-World/statuses/{sha}
subscribers_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/subscribers
subscription_url
string <uri>
必需 示例值: http://api.github.com/repos/octocat/Hello-World/subscription
示例值: https://svn.github.com/octocat/Hello-World
示例值: http://api.github.com/repos/octocat/Hello-World/tags
示例值: http://api.github.com/repos/octocat/Hello-World/teams
temp_clone_token
string | null
可选 template_repository
object | null | allOf {1}
可选
#/components/schemas/repository
可选 Could not resolve '#/components/schemas/repository' 示例值: ["octocat","atom","electron","API"]
示例值: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}
updated_at
string <date-time>
必需 示例值: https://api.github.com/repos/octocat/Hello-World
The repository visibility: public, private, or internal.
【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开 发者 交流群,互助沟通
扫码加入交流群 修改于 2022-08-24 13:05:04