Interface GithubConsumerService
- All Known Implementing Classes:
GithubConsumerServiceImpl
public interface GithubConsumerService
-
Method Summary
Modifier and TypeMethodDescriptioncheckGitHubTokenStatus(String accessToken) Check gitHub personal access tokencreateWebhook(String organizationName, String[] triggers, String accessToken) create github organization hook.deleteWebhook(WebHook webHook) delete gitHub webhookforceUpdateWebhook(WebHook webHook) Force Update WebhookretrieveOrganizationRepos(WebHook webHook, int page, int perPage, String keyword) Retrieve available github organization repositories.retrieveRemoteOrganization(long organizationRemoteId, String accessToken) Retrieve available github organization info.retrieveRemoteOrganization(String organizationName, String accessToken) Retrieve available github organization info.
-
Method Details
-
createWebhook
WebHook createWebhook(String organizationName, String[] triggers, String accessToken) throws IllegalAccessException create github organization hook.- Parameters:
organizationName- github organization nameaccessToken- gitHub personal access token- Throws:
IllegalAccessException- when user is not authorized to create github webhook
-
deleteWebhook
delete gitHub webhook- Parameters:
webHook- github webHook
-
retrieveRemoteOrganization
Retrieve available github organization info.- Parameters:
organizationRemoteId- gitHub organization remote IdaccessToken- gitHub personal access token- Returns:
RemoteOrganization
-
retrieveRemoteOrganization
RemoteOrganization retrieveRemoteOrganization(String organizationName, String accessToken) throws org.exoplatform.commons.exception.ObjectNotFoundException Retrieve available github organization info.- Parameters:
organizationName- gitHub organization nameaccessToken- gitHub personal access token- Returns:
RemoteOrganization- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the github organization identified by its technical name is not found
-
retrieveOrganizationRepos
List<RemoteRepository> retrieveOrganizationRepos(WebHook webHook, int page, int perPage, String keyword) Retrieve available github organization repositories.- Parameters:
webHook- webHookpage- pageperPage- perPagekeyword- to search in repositories title- Returns:
ListofRemoteRepository
-
forceUpdateWebhook
Force Update Webhook- Parameters:
webHook- webHook- Returns:
- response status
-
checkGitHubTokenStatus
Check gitHub personal access token- Parameters:
accessToken- gitHub personal access token- Returns:
TokenStatus
-