Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit df861f5

Browse filesBrowse files
committed
Adding methods to GHCreateRepositoryBuilder to allow setting the allowed merge methods for pull requests.
1 parent e25ae27 commit df861f5
Copy full SHA for df861f5

File tree

Expand file treeCollapse file tree

1 file changed

+26
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+26
-2
lines changed

‎src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java
+26-2Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public class GHCreateRepositoryBuilder {
2121
}
2222

2323
public GHCreateRepositoryBuilder description(String description) {
24-
this.builder.with("description",description);
25-
return this;
24+
this.builder.with("description",description);
25+
return this;
2626
}
2727

2828
public GHCreateRepositoryBuilder homepage(URL homepage) {
@@ -74,6 +74,30 @@ public GHCreateRepositoryBuilder autoInit(boolean b) {
7474
return this;
7575
}
7676

77+
/**
78+
* Allow or disallow squash-merging pull requests.
79+
*/
80+
public GHCreateRepositoryBuilder allowSquashMerge(boolean b) {
81+
this.builder.with("allow_squash_merge",b);
82+
return this;
83+
}
84+
85+
/**
86+
* Allow or disallow merging pull requests with a merge commit.
87+
*/
88+
public GHCreateRepositoryBuilder allowMergeCommit(boolean b) {
89+
this.builder.with("allow_merge_commit",b);
90+
return this;
91+
}
92+
93+
/**
94+
* Allow or disallow rebase-merging pull requests.
95+
*/
96+
public GHCreateRepositoryBuilder allowRebaseMerge(boolean b) {
97+
this.builder.with("allow_rebase_merge",b);
98+
return this;
99+
}
100+
77101
/**
78102
* Creates a default .gitignore
79103
*

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.