View Source Tentacat.Repositories.Collaborators (Tentacat v2.5.0)

Summary

Functions

List collaborators for a specific repository.

Returns the permission level of a collaborator.

Functions

Link to this function

add(client \\ %Client{}, owner, repo, username, body)

View Source
@spec add(Tentacat.Client.t(), binary(), binary(), binary(), map()) ::
  Tentacat.response()

Add user as a collaborator.

Example

Tentacat.Repositories.Collaborators.add "elixir-lang", "elixir", "username", %{}
Tentacat.Repositories.Collaborators.add client, "elixir-lang", "elixir", "username", %{ permission: "push" }
Tentacat.Repositories.Collaborators.add client, "elixir-lang", "elixir", "username", %{}

More info at: https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator

Link to this function

collaborator?(client \\ %Client{}, owner, repo, username)

View Source
@spec collaborator?(Tentacat.Client.t(), binary(), binary(), binary()) ::
  Tentacat.response()

Check if a user is a collaborator.

Example

Tentacat.Repositories.Collaborators.collaborator? "elixir-lang", "elixir", "username"
Tentacat.Repositories.Collaborators.collaborator? client, "elixir-lang", "elixir", "username"

More info at: https://developer.github.com/v3/repos/collaborators/#check-if-a-user-is-a-collaborator

Link to this function

delete(client \\ %Client{}, owner, repo, username)

View Source
@spec delete(Tentacat.Client.t(), binary(), binary(), binary()) :: Tentacat.response()

Remove user as a collaborator.

Example

Tentacat.Repositories.Collaborators.delete "elixir-lang", "elixir", "username"
Tentacat.Repositories.Collaborators.delete client, "elixir-lang", "elixir", "username"

More info at: https://developer.github.com/v3/repos/collaborators/#remove-user-as-a-collaborator

Link to this function

list(client \\ %Client{}, owner, repo)

View Source

List collaborators for a specific repository.

Example

Tentacat.Repositories.Collaborators.list "elixir-lang", "elixir"
Tentacat.Repositories.Collaborators.list client, "elixir-lang", "elixir"

More info at: https://developer.github.com/v3/repos/collaborators/#list-collaborators

Link to this function

permission(client \\ %Client{}, owner, repo, username)

View Source
@spec permission(Tentacat.Client.t(), binary(), binary(), binary()) ::
  Tentacat.response()

Returns the permission level of a collaborator.

Example

Tentacat.Repositories.Collaborators.permission "elixir-lang", "elixir", "username"
Tentacat.Repositories.Collaborators.permission client, "elixir-lang", "elixir", "username"

More info at: https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level