private GHRepository create() throws IOException { GHRepository repo = gitHub.createRepository(repoName).create(); ensureRepositoryCreated(repo, System.currentTimeMillis()); LOG.info("GitHub repo {} has been created", repo.getHtmlUrl()); return repo; }
/** * Create a public repo. We cannot make private repos for open source users because they'd be forced to buy a * paid account. * * @param repoName Name of the repository * @return * @throws IOException */ public GHRepository createPublicRepo(String repoName) throws IOException { GHCreateRepositoryBuilder repoBuilder = github.createRepository(repoName); repoBuilder.private_(false); return repoBuilder.create(); }
/** * Create a public repo. We cannot make private repos for open source users because they'd be forced to buy a * paid account. * * @param repoName Name of the repository * @return * @throws IOException */ public GHRepository createPublicRepo(String repoName) throws IOException { GHCreateRepositoryBuilder repoBuilder = github.createRepository(repoName); repoBuilder.private_(false); return repoBuilder.create(); }
/** * Creates a new repository. * * @return * Newly created repository. * @deprecated * Use {@link #createRepository(String)} that uses a builder pattern to let you control every aspect. */ public GHRepository createRepository(String name, String description, String homepage, boolean isPublic) throws IOException { return createRepository(name).description(description).homepage(homepage).private_(!isPublic).create(); }
/** * Creates a new repository. * * @return * Newly created repository. * @deprecated * Use {@link #createRepository(String)} that uses a builder pattern to let you control every aspect. */ public GHRepository createRepository(String name, String description, String homepage, boolean isPublic) throws IOException { return createRepository(name).description(description).homepage(homepage).private_(!isPublic).create(); }
initializeRepos(org, REPOS, IMAGE_1, createdRepos, gitHubUtil); GHRepository store = github.createRepository(STORE_NAME) .description("Delete if this exists. If it exists, then an integration test crashed somewhere.") .create();
/** * Create the repository on Github * * @throws IOException if something goes horribly wrong */ @TaskAction public void configureRepository() throws IOException { GitHub github = GitHub.connect(null, getGithubToken()); String user = github.getMyself().getLogin(); GHRepository repository = null; try { repository = github.getRepository(user + "/" + getRepositoryName()); } catch (FileNotFoundException e) { GHCreateRepositoryBuilder repositoryCreator = github.createRepository(getRepositoryName()); repository = repositoryCreator.create(); } String description = getRepositoryDescription(); if (description != null && !description.equals(repository.getDescription())) { repository.setDescription(description); } }
/** * Create the repository on Github * * @throws IOException if something goes horribly wrong */ @TaskAction public void configureRepository() throws IOException { GitHub github = GitHub.connect(null, getGithubToken()); String user = github.getMyself().getLogin(); GHRepository repository = null; try { repository = github.getRepository(user + "/" + getRepositoryName()); } catch (FileNotFoundException e) { GHCreateRepositoryBuilder repositoryCreator = github.createRepository(getRepositoryName()); repository = repositoryCreator.create(); } String description = getRepositoryDescription(); if (description != null && !description.equals(repository.getDescription())) { repository.setDescription(description); } }