congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
GitlabProject.getHttpUrl
Code IndexAdd Tabnine to your IDE (free)

How to use
getHttpUrl
method
in
org.gitlab.api.models.GitlabProject

Best Java code snippets using org.gitlab.api.models.GitlabProject.getHttpUrl (Showing top 5 results out of 315)

origin: timols/jenkins-gitlab-merge-request-builder-plugin

public String getSourceRepository() {
  if (builder.getTrigger().getUseHttpUrl()) {
    return sourceProject.getHttpUrl();
  } else {
    return sourceProject.getSshUrl();
  }
}
origin: tomasbjerre/git-changelog-lib

public Optional<GitLabIssue> getIssue(String projectName, Integer matchedIssue)
  throws GitChangelogIntegrationException {
 GitlabAPI gitLabApi = GitlabAPI.connect(hostUrl, apiToken);
 GitlabProject project;
 try {
  project = gitLabApi.getProject(projectName);
 } catch (Exception e) {
  throw new GitChangelogIntegrationException(
    "Unable to find project \""
      + projectName
      + "\". It should be \"tomas.bjerre85/violations-test\" for a repo like: https://gitlab.com/tomas.bjerre85/violations-test",
    e);
 }
 Integer projectId = project.getId();
 String httpUrl = project.getHttpUrl();
 try {
  List<GitlabIssue> issues =
    cache.get(new GitLabProjectIssuesCacheKey(hostUrl, apiToken, projectId));
  for (GitlabIssue candidate : issues) {
   if (candidate.getIid() == matchedIssue) {
    return Optional.of(createGitLabIssue(httpUrl, candidate));
   }
  }
  return Optional.absent();
 } catch (Exception e) {
  throw new GitChangelogIntegrationException(e.getMessage(), e);
 }
}
origin: PavlikPolivka/GitLabProjects

public Optional<GitlabProject> resolveProject(ProjectState projectState, GitRemote remote, GitRepository repository) {
  String remoteProjectName = remote.getName();
  String remoteUrl = remote.getFirstUrl();
  if(projectState.getProjectId(remoteUrl) == null) {
    try {
      Collection<GitlabProject> projects = settingsState.api(repository).getProjects();
      for (GitlabProject gitlabProject : projects) {
        if (gitlabProject.getName().toLowerCase().equals(remoteProjectName.toLowerCase()) || urlMatch(remoteUrl, gitlabProject.getSshUrl()) || urlMatch(remoteUrl, gitlabProject.getHttpUrl())) {
          Integer projectId = gitlabProject.getId();
          projectState.setProjectId(remoteUrl, projectId);
          return Optional.of(gitlabProject);
        }
      }
    } catch (Throwable throwable) {
      throw new GitLabException("Cannot match project.", throwable);
    }
  } else {
    try {
      return Optional.of(settingsState.api(repository).getProject(projectState.getProjectId(remoteUrl)));
    } catch (Exception e) {
      projectState.setProjectId(remoteUrl, null);
    }
  }
  return Optional.empty();
}
origin: PavlikPolivka/GitLabProjects

public Collection<ProjectDto> loadProjects(GitlabServer server) throws Throwable {
  ApiFacade apiFacade = api(server);
  Collection<ProjectDto> projects = getProjects();
  if(projects == null) {
    projects = new ArrayList<>();
  }
  for (GitlabProject gitlabProject : apiFacade.getProjects()) {
    ProjectDto projectDto = new ProjectDto();
    projectDto.setName(gitlabProject.getName());
    projectDto.setNamespace(gitlabProject.getNamespace().getName());
    projectDto.setHttpUrl(gitlabProject.getHttpUrl());
    projectDto.setSshUrl(gitlabProject.getSshUrl());
    projects.add(projectDto);
  }
  this.setProjects(projects);
  return projects;
}
origin: PavlikPolivka/GitLabProjects

final String remoteUrl = authSsh ? gitlabProject.getSshUrl() : gitlabProject.getHttpUrl();
org.gitlab.api.modelsGitlabProjectgetHttpUrl

Popular methods of GitlabProject

  • getId
  • getName
  • getNamespace
  • getPathWithNamespace
  • getNameWithNamespace
  • <init>
  • getApprovalsBeforeMerge
  • getDefaultBranch
  • getDescription
  • getImportUrl
  • getOnlyAllowMergeIfAllDiscussionsAreResolved
  • getOnlyAllowMergeIfPipelineSucceeds
  • getOnlyAllowMergeIfAllDiscussionsAreResolved,
  • getOnlyAllowMergeIfPipelineSucceeds,
  • getPath,
  • getRepositoryStorage,
  • getSshUrl,
  • getVisibility,
  • hasPublicJobs,
  • isContainerRegistryEnabled,
  • isIssuesEnabled

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now