本文整理汇总了Java中org.kohsuke.github.GHCreateRepositoryBuilder类的典型用法代码示例。如果您正苦于以下问题:Java GHCreateRepositoryBuilder类的具体用法?Java GHCreateRepositoryBuilder怎么用?Java GHCreateRepositoryBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GHCreateRepositoryBuilder类属于org.kohsuke.github包,在下文中一共展示了GHCreateRepositoryBuilder类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createRepository
import org.kohsuke.github.GHCreateRepositoryBuilder; //导入依赖的package包/类
public GHRepository createRepository(String orgName, String repoName, String description) throws IOException {
GHCreateRepositoryBuilder builder;
if (Strings.isNullOrBlank(orgName) || orgName.equals(details.getUsername())) {
builder = github.createRepository(repoName);
} else {
builder = github.getOrganization(orgName).createRepository(repoName);
}
// TODO link to the space URL?
builder.private_(false)
.homepage("")
.issues(false)
.downloads(false)
.wiki(false);
if (Strings.isNotBlank(description)) {
builder.description(description);
}
return builder.create();
}
示例2: testCreate
import org.kohsuke.github.GHCreateRepositoryBuilder; //导入依赖的package包/类
public static void testCreate()throws Exception{
GitHub github = GitHub.connectUsingPassword("[email protected]", "xiaomin0322####");
GHCreateRepositoryBuilder repo = github.createRepository("testgithub");
repo.create();
}