Class GitLabHookCreator

java.lang.Object
io.jenkins.plugins.gitlabbranchsource.GitLabHookCreator

public class GitLabHookCreator extends Object
  • Field Details

    • LOGGER

      public static final Logger LOGGER
  • Constructor Details

    • GitLabHookCreator

      public GitLabHookCreator()
  • Method Details

    • register

      public static void register(jenkins.scm.api.SCMNavigatorOwner owner, GitLabSCMNavigator navigator, GitLabHookRegistration systemhookMode)
    • 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 public static String getHookUrl(boolean isWebHook)
      Deprecated.
    • getHookUrl

      public static String getHookUrl(GitLabServer server, boolean isWebHook)
      Parameters:
      server - the GitLabServer for which the hooks URL would be created. If not null and it has a GitLabServer.getHooksRootUrl(), then the hook URL will be based on this root URL. Otherwise, the hook URL will be based on Jenkins.getRootUrl().
      isWebHook - true to get the webhook URL, false for 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

      public static boolean isTokenEqual(String str1, String str2)