curl --location --request PATCH 'https://api.github.com/repos//' \
--header 'Content-Type: application/json' \
--data-raw '{
"description": "This is your first repository",
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"homepage": "https://github.com",
"name": "Hello-World",
"private": true
}'
Authorization: Bearer ********************
true
to allow merging pull requests with a merge commit, or false
to prevent merging pull requests with merge commits.true
to allow rebase-merging pull requests, or false
to prevent rebase-merging.true
to allow squash-merging pull requests, or false
to prevent squash-merging.true
to archive this repository. Note: You cannot unarchive repositories through the API.true
to allow automatically deleting head branches when pull requests are merged, or false
to prevent automatic deletion.true
to enable issues for this repository or false
to disable them.true
to enable projects for this repository or false
to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false
, and if you pass true
, the API returns an error.true
to enable the wiki for this repository or false
to disable it.true
to make this repo available as a template repository or false
to prevent it.true
to make the repository private or false
to make it public. Default: false
.422
error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. Note: You will get a 422
error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.public
or private
. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility
can also be internal
. The visibility
parameter overrides the private
parameter when you use both along with the nebula-preview
preview header.【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通