Class GitLabHookCreator
java.lang.Object
io.jenkins.plugins.gitlabbranchsource.GitLabHookCreator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateSystemHookWhenMissing(GitLabServer server, com.cloudbees.plugins.credentials.common.StandardCredentials credentials) static org.gitlab4j.api.models.ProjectHookstatic StringcreateWebHookWhenMissing(org.gitlab4j.api.GitLabApi gitLabApi, String project, String hookUrl, String secretToken) static StringgetHookUrl(boolean isWebHook) Deprecated.static StringgetHookUrl(GitLabServer server, boolean isWebHook) static booleanisTokenEqual(String str1, String str2) static voidregister(GitLabSCMSource source, GitLabHookRegistration webhookMode, GitLabHookRegistration systemhookMode) static voidregister(jenkins.scm.api.SCMNavigatorOwner owner, GitLabSCMNavigator navigator, GitLabHookRegistration systemhookMode)
-
Field Details
-
LOGGER
-
-
Constructor Details
-
GitLabHookCreator
public GitLabHookCreator()
-
-
Method Details
-
register
public static void register(GitLabSCMSource source, GitLabHookRegistration webhookMode, GitLabHookRegistration systemhookMode) -
createSystemHookWhenMissing
public static void createSystemHookWhenMissing(GitLabServer server, com.cloudbees.plugins.credentials.common.StandardCredentials credentials) -
getHookUrl
Deprecated.usegetHookUrl(GitLabServer,boolean)instead -
getHookUrl
- Parameters:
server- theGitLabServerfor which the hooks URL would be created. If notnulland it has aGitLabServer.getHooksRootUrl(), then the hook URL will be based on this root URL. Otherwise, the hook URL will be based onJenkins.getRootUrl().isWebHook-trueto get the webhook URL,falsefor the systemhook URL- Returns:
- a webhook or systemhook URL
-
createWebHook
public static org.gitlab4j.api.models.ProjectHook createWebHook() -
createWebHookWhenMissing
public static String createWebHookWhenMissing(org.gitlab4j.api.GitLabApi gitLabApi, String project, String hookUrl, String secretToken) throws org.gitlab4j.api.GitLabApiException - Throws:
org.gitlab4j.api.GitLabApiException
-
isTokenEqual
getHookUrl(GitLabServer,boolean)instead