Collaborators

March 7, 2020 ยท View on GitHub

Add user as a collaborator

PUT /repos/:username/:reponame/collaborators/:collaborator

Parameters

NameTypeDescription
permissionstringThe permission to grant the collaborator. Can be one of read, write and admin. Default is write. Read details on forum

Get collaborators

GET /repos/:username/:reponame/collaborators

Response

Status: 200 OK
[
  {
    "id": 3,
    "username": "user1",
    "login": "user1",
    "full_name": "",
    "email": "user1@user.com",
    "avatar_url": "https://secure.gravatar.com/avatar/0207f4280f6c1bd45e1a2ed7cb1cca3d",
    "permissions": {
      "admin": false,
      "push": true,
      "pull": true
    }
  }
]

Delete collaborator

DELETE /repos/:username/:reponame/collaborators/:collaborator