Package org.eclipse.egit.github.core

Examples of org.eclipse.egit.github.core.RepositoryId


        Scm scm = Mockito.mock(Scm.class);
        when(scm.getUrl()).thenReturn("https://github.com/nanoko-project/coffee-mill-maven-plugin");
        MavenProject project = Mockito.mock(MavenProject.class);
        when(project.getUrl()).thenReturn("must not be used");
        when(project.getScm()).thenReturn(scm);
        RepositoryId repositoryId = RepositoryUtils.getRepository(project, null, null);
        assertThat(repositoryId).isNotNull();
        assertThat(repositoryId.getName()).isEqualTo("coffee-mill-maven-plugin");
        assertThat(repositoryId.getOwner()).isEqualTo("nanoko-project");
    }
View Full Code Here


      return RepositoryId.create(owner, name);

    if (project == null)
      return null;

    RepositoryId repo = null;
    // Extract repository from SCM URLs first if present
    final Scm scm = project.getScm();
    if (scm != null) {
      repo = RepositoryId.createFromUrl(scm.getUrl());
      if (repo == null)
View Full Code Here

   * @throws MojoExecutionException
   */
  protected RepositoryId getRepository(final MavenProject project,
      final String owner, final String name)
      throws MojoExecutionException {
    RepositoryId repository = RepositoryUtils.getRepository(project, owner,
        name);
    if (repository == null)
      throw new MojoExecutionException(
          "No GitHub repository (owner and name) configured");
    if (isDebug())
      debug(MessageFormat.format("Using GitHub repository {0}",
          repository.generateId()));
    return repository;
  }
View Full Code Here

        if (skip) {
            info("Github Site Plugin execution skipped");
            return;
        }

    RepositoryId repository = getRepository(project, repositoryOwner,
        repositoryName);

    if (dryRun)
      info("Dry run mode, repository will not be modified");
View Full Code Here

    if (token != null)
      commits.getClient().setOAuth2Token(token);
    else
      commits.getClient().setCredentials(username, password);
    final List<Commit> ret = new ArrayList<Commit>();
    RepositoryId repositoryId = new RepositoryId(owner, repository);
    for (RepositoryCommit curCommit : commits.pageCommits(repositoryId, 30)
        .next()) {
      if (curCommit.getCommit().getCommitter().getDate().after(oneDayAgo)) {
        RepositoryCommit fullCommit = fullCommits.get(curCommit
            .getSha());
View Full Code Here

TOP

Related Classes of org.eclipse.egit.github.core.RepositoryId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.