curl --request PUT \
--url https://gogs.example.com/api/v1/repos/{owner}/{repo}/collaborators/{collaborator} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"permission": "write"
}
'curl --request PUT \
--url https://gogs.example.com/api/v1/repos/{owner}/{repo}/collaborators/{collaborator} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"permission": "write"
}
'Personal access token. Use format: token {YOUR_ACCESS_TOKEN}
Repository owner
Repository name
Collaborator username
read, write, admin Collaborator has been added.