Unverified Commit b5392b8f authored by Gerard Krupa's avatar Gerard Krupa Committed by GitHub
Browse files

Added commit_committer_check and reject_unsigned_commits to PushRules (#575)

parent 6c46720e
......@@ -2530,7 +2530,10 @@ public class ProjectApi extends AbstractApi implements Constants {
.withParam("branch_name_regex", pushRule.getBranchNameRegex())
.withParam("author_email_regex", pushRule.getAuthorEmailRegex())
.withParam("file_name_regex", pushRule.getFileNameRegex())
.withParam("max_file_size", pushRule.getMaxFileSize());
.withParam("max_file_size", pushRule.getMaxFileSize())
.withParam("commit_committer_check", pushRule.getCommitCommitterCheck())
.withParam("reject_unsigned_commits", pushRule.getRejectUnsignedCommits());
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "push_rule");
return (response.readEntity(PushRules.class));
......@@ -2568,7 +2571,9 @@ public class ProjectApi extends AbstractApi implements Constants {
.withParam("branch_name_regex", pushRule.getBranchNameRegex())
.withParam("author_email_regex", pushRule.getAuthorEmailRegex())
.withParam("file_name_regex", pushRule.getFileNameRegex())
.withParam("max_file_size", pushRule.getMaxFileSize());
.withParam("max_file_size", pushRule.getMaxFileSize())
.withParam("commit_committer_check", pushRule.getCommitCommitterCheck())
.withParam("reject_unsigned_commits", pushRule.getRejectUnsignedCommits());
final Response response = putWithFormData(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "push_rule");
return (response.readEntity(PushRules.class));
......
......@@ -17,6 +17,8 @@ public class PushRules {
private String authorEmailRegex;
private String fileNameRegex;
private Integer maxFileSize;
private Boolean commitCommitterCheck;
private Boolean rejectUnsignedCommits;
public Integer getId() {
return id;
......@@ -151,6 +153,32 @@ public class PushRules {
return (this);
}
public Boolean getCommitCommitterCheck() {
return commitCommitterCheck;
}
public void setCommitCommitterCheck(Boolean commitCommitterCheck) {
this.commitCommitterCheck = commitCommitterCheck;
}
public PushRules withCommitCommitterCheck(Boolean commitCommitterCheck) {
this.commitCommitterCheck = commitCommitterCheck;
return (this);
}
public Boolean getRejectUnsignedCommits() {
return rejectUnsignedCommits;
}
public void setRejectUnsignedCommits(Boolean rejectUnsignedCommits) {
this.rejectUnsignedCommits = rejectUnsignedCommits;
}
public PushRules withRejectUnsignedCommits(Boolean rejectUnsignedCommits) {
this.rejectUnsignedCommits = rejectUnsignedCommits;
return (this);
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment