diff --git a/docs/EditRepoOption.md b/docs/EditRepoOption.md index 742dc3b..e5cc01e 100644 --- a/docs/EditRepoOption.md +++ b/docs/EditRepoOption.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **allowSquashMerge** | **Boolean** | either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. | [optional] **archived** | **Boolean** | set to `true` to archive this repository. | [optional] **autodetectManualMerge** | **Boolean** | either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. | [optional] +**defaultAllowMaintainerEdit** | **Boolean** | set to `true` to allow edits from maintainers by default | [optional] **defaultBranch** | **String** | sets the default branch for this repository. | [optional] **defaultDeleteBranchAfterMerge** | **Boolean** | set to `true` to delete pr branch after merge by default | [optional] **defaultMergeStyle** | **String** | set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", or \"squash\". | [optional] diff --git a/docs/Repository.md b/docs/Repository.md index 63cf802..4b52f77 100644 --- a/docs/Repository.md +++ b/docs/Repository.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **avatarUrl** | **String** | | [optional] **cloneUrl** | **String** | | [optional] **createdAt** | [**Date**](Date.md) | | [optional] +**defaultAllowMaintainerEdit** | **Boolean** | | [optional] **defaultBranch** | **String** | | [optional] **defaultDeleteBranchAfterMerge** | **Boolean** | | [optional] **defaultMergeStyle** | **String** | | [optional] diff --git a/src/main/java/org/gitnex/tea4j/v2/models/EditRepoOption.java b/src/main/java/org/gitnex/tea4j/v2/models/EditRepoOption.java index 57bd2bd..e9b8cc4 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/EditRepoOption.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/EditRepoOption.java @@ -46,6 +46,9 @@ public class EditRepoOption implements Serializable { @SerializedName("autodetect_manual_merge") private Boolean autodetectManualMerge = null; + @SerializedName("default_allow_maintainer_edit") + private Boolean defaultAllowMaintainerEdit = null; + @SerializedName("default_branch") private String defaultBranch = null; @@ -278,6 +281,25 @@ public class EditRepoOption implements Serializable { this.autodetectManualMerge = autodetectManualMerge; } + public EditRepoOption defaultAllowMaintainerEdit(Boolean defaultAllowMaintainerEdit) { + this.defaultAllowMaintainerEdit = defaultAllowMaintainerEdit; + return this; + } + + /** + * set to `true` to allow edits from maintainers by default + * + * @return defaultAllowMaintainerEdit + */ + @Schema(description = "set to `true` to allow edits from maintainers by default") + public Boolean isDefaultAllowMaintainerEdit() { + return defaultAllowMaintainerEdit; + } + + public void setDefaultAllowMaintainerEdit(Boolean defaultAllowMaintainerEdit) { + this.defaultAllowMaintainerEdit = defaultAllowMaintainerEdit; + } + public EditRepoOption defaultBranch(String defaultBranch) { this.defaultBranch = defaultBranch; return this; @@ -660,6 +682,8 @@ public class EditRepoOption implements Serializable { && Objects.equals(this.allowSquashMerge, editRepoOption.allowSquashMerge) && Objects.equals(this.archived, editRepoOption.archived) && Objects.equals(this.autodetectManualMerge, editRepoOption.autodetectManualMerge) + && Objects.equals( + this.defaultAllowMaintainerEdit, editRepoOption.defaultAllowMaintainerEdit) && Objects.equals(this.defaultBranch, editRepoOption.defaultBranch) && Objects.equals( this.defaultDeleteBranchAfterMerge, editRepoOption.defaultDeleteBranchAfterMerge) @@ -692,6 +716,7 @@ public class EditRepoOption implements Serializable { allowSquashMerge, archived, autodetectManualMerge, + defaultAllowMaintainerEdit, defaultBranch, defaultDeleteBranchAfterMerge, defaultMergeStyle, @@ -729,6 +754,9 @@ public class EditRepoOption implements Serializable { sb.append(" autodetectManualMerge: ") .append(toIndentedString(autodetectManualMerge)) .append("\n"); + sb.append(" defaultAllowMaintainerEdit: ") + .append(toIndentedString(defaultAllowMaintainerEdit)) + .append("\n"); sb.append(" defaultBranch: ").append(toIndentedString(defaultBranch)).append("\n"); sb.append(" defaultDeleteBranchAfterMerge: ") .append(toIndentedString(defaultDeleteBranchAfterMerge)) diff --git a/src/main/java/org/gitnex/tea4j/v2/models/Repository.java b/src/main/java/org/gitnex/tea4j/v2/models/Repository.java index 4f9d1ae..0f2ea10 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/Repository.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/Repository.java @@ -50,6 +50,9 @@ public class Repository implements Serializable { @SerializedName("created_at") private Date createdAt = null; + @SerializedName("default_allow_maintainer_edit") + private Boolean defaultAllowMaintainerEdit = null; + @SerializedName("default_branch") private String defaultBranch = null; @@ -347,6 +350,25 @@ public class Repository implements Serializable { this.createdAt = createdAt; } + public Repository defaultAllowMaintainerEdit(Boolean defaultAllowMaintainerEdit) { + this.defaultAllowMaintainerEdit = defaultAllowMaintainerEdit; + return this; + } + + /** + * Get defaultAllowMaintainerEdit + * + * @return defaultAllowMaintainerEdit + */ + @Schema(description = "") + public Boolean isDefaultAllowMaintainerEdit() { + return defaultAllowMaintainerEdit; + } + + public void setDefaultAllowMaintainerEdit(Boolean defaultAllowMaintainerEdit) { + this.defaultAllowMaintainerEdit = defaultAllowMaintainerEdit; + } + public Repository defaultBranch(String defaultBranch) { this.defaultBranch = defaultBranch; return this; @@ -1163,6 +1185,7 @@ public class Repository implements Serializable { && Objects.equals(this.avatarUrl, repository.avatarUrl) && Objects.equals(this.cloneUrl, repository.cloneUrl) && Objects.equals(this.createdAt, repository.createdAt) + && Objects.equals(this.defaultAllowMaintainerEdit, repository.defaultAllowMaintainerEdit) && Objects.equals(this.defaultBranch, repository.defaultBranch) && Objects.equals( this.defaultDeleteBranchAfterMerge, repository.defaultDeleteBranchAfterMerge) @@ -1220,6 +1243,7 @@ public class Repository implements Serializable { avatarUrl, cloneUrl, createdAt, + defaultAllowMaintainerEdit, defaultBranch, defaultDeleteBranchAfterMerge, defaultMergeStyle, @@ -1280,6 +1304,9 @@ public class Repository implements Serializable { sb.append(" avatarUrl: ").append(toIndentedString(avatarUrl)).append("\n"); sb.append(" cloneUrl: ").append(toIndentedString(cloneUrl)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" defaultAllowMaintainerEdit: ") + .append(toIndentedString(defaultAllowMaintainerEdit)) + .append("\n"); sb.append(" defaultBranch: ").append(toIndentedString(defaultBranch)).append("\n"); sb.append(" defaultDeleteBranchAfterMerge: ") .append(toIndentedString(defaultDeleteBranchAfterMerge))