本文整理匯總了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();
}