Skip to content

Commit

Permalink
Adding methods to GHCreateRepositoryBuilder to allow setting the allo…
Browse files Browse the repository at this point in the history
…wed merge methods for pull requests.
  • Loading branch information
notanother committed Jan 10, 2018
1 parent e25ae27 commit df861f5
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public class GHCreateRepositoryBuilder {
}

public GHCreateRepositoryBuilder description(String description) {
this.builder.with("description",description);
return this;
this.builder.with("description",description);
return this;
}

public GHCreateRepositoryBuilder homepage(URL homepage) {
Expand Down Expand Up @@ -74,6 +74,30 @@ public GHCreateRepositoryBuilder autoInit(boolean b) {
return this;
}

/**
* Allow or disallow squash-merging pull requests.
*/
public GHCreateRepositoryBuilder allowSquashMerge(boolean b) {
this.builder.with("allow_squash_merge",b);
return this;
}

/**
* Allow or disallow merging pull requests with a merge commit.
*/
public GHCreateRepositoryBuilder allowMergeCommit(boolean b) {
this.builder.with("allow_merge_commit",b);
return this;
}

/**
* Allow or disallow rebase-merging pull requests.
*/
public GHCreateRepositoryBuilder allowRebaseMerge(boolean b) {
this.builder.with("allow_rebase_merge",b);
return this;
}

/**
* Creates a default .gitignore
*
Expand Down

0 comments on commit df861f5

Please sign in to comment.