Package com.jcabi.github
Interface Collaborators
-
@Immutable public interface CollaboratorsGithub repository collaborators.- Since:
- 0.8
- Version:
- $Id: a95ca74599ba0a3a8757a2c607d6fa85d403d599 $
- Author:
- Aleksey Popov (alopen@yandex.ru)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCollaborators.PermissionPermission levels a user can be granted in an organization repository.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(String user)Add user as a collaborator.voidaddWithPermission(String user, Collaborators.Permission permission)Add user with permissions.booleanisCollaborator(String user)Check if a user is collaborator.Iterable<User>iterate()Iterates over repo collaborators.Stringpermission(String user)Get user permission in this repo.voidremove(String user)Remove user as a collaborator.Reporepo()Owner of them.
-
-
-
Method Detail
-
repo
Repo repo()
Owner of them.- Returns:
- Repo
-
isCollaborator
boolean isCollaborator(String user) throws IOException
Check if a user is collaborator.- Parameters:
user- User- Returns:
- True is a user is a collaborator, otherwise returns false
- Throws:
IOException- If there is any I/O problem- See Also:
- Check if a user is collaborator
-
add
void add(String user) throws IOException
Add user as a collaborator.- Parameters:
user- User- Throws:
IOException- If there is any I/O problem- See Also:
- Add user as a collaborator
-
addWithPermission
void addWithPermission(String user, Collaborators.Permission permission) throws IOException
Add user with permissions. Only works on an organization repository- Parameters:
user- User to addpermission- Permission level to grant- Throws:
IOException- if there is an I/O problem- See Also:
- Add user as a collaborator
-
permission
String permission(String user) throws IOException
Get user permission in this repo.- Parameters:
user- User to check- Returns:
- Permission level granted, incl. "admin", "write", "read", or "none"
- Throws:
IOException- if there is an I/O problem- See Also:
- Get repository permissions for a user
-
remove
void remove(String user) throws IOException
Remove user as a collaborator.- Parameters:
user- User- Throws:
IOException- If there is any I/O problem- See Also:
- Remove user as a collaborator
-
-