username:password
Authorization: Basic *****************
branch
before creating the file{
"author": {
"email": "user@example.com",
"name": "string"
},
"branch": "string",
"committer": {
"email": "user@example.com",
"name": "string"
},
"content": "string",
"dates": {
"author": "2019-08-24T14:15:22Z",
"committer": "2019-08-24T14:15:22Z"
},
"from_path": "string",
"message": "string",
"new_branch": "string",
"sha": "string",
"signoff": true
}
curl --location --request PUT '/repos///contents/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"author": {
"email": "user@example.com",
"name": "string"
},
"branch": "string",
"committer": {
"email": "user@example.com",
"name": "string"
},
"content": "string",
"dates": {
"author": "2019-08-24T14:15:22Z",
"committer": "2019-08-24T14:15:22Z"
},
"from_path": "string",
"message": "string",
"new_branch": "string",
"sha": "string",
"signoff": true
}'
content
is populated when type
is file
, otherwise nullencoding
is populated when type
is file
, otherwise nullsubmodule_git_url
is populated when type
is submodule
, otherwise nulltarget
is populated when type
is symlink
, otherwise nulltype
will be file
, dir
, symlink
, or submodule
{
"commit": {
"author": {
"date": "string",
"email": "user@example.com",
"name": "string"
},
"committer": {
"date": "string",
"email": "user@example.com",
"name": "string"
},
"created": "2019-08-24T14:15:22Z",
"html_url": "string",
"message": "string",
"parents": [
{
"created": "2019-08-24T14:15:22Z",
"sha": "string",
"url": "string"
}
],
"sha": "string",
"tree": {
"created": "2019-08-24T14:15:22Z",
"sha": "string",
"url": "string"
},
"url": "string"
},
"content": {
"_links": {
"git": "string",
"html": "string",
"self": "string"
},
"content": "string",
"download_url": "string",
"encoding": "string",
"git_url": "string",
"html_url": "string",
"last_commit_sha": "string",
"name": "string",
"path": "string",
"sha": "string",
"size": 0,
"submodule_git_url": "string",
"target": "string",
"type": "string",
"url": "string"
},
"verification": {
"payload": "string",
"reason": "string",
"signature": "string",
"signer": {
"email": "user@example.com",
"name": "string",
"username": "string"
},
"verified": true
}
}