diff --git a/docs/MergePullRequestOption.md b/docs/MergePullRequestOption.md
index 37412c9..24e6d16 100644
--- a/docs/MergePullRequestOption.md
+++ b/docs/MergePullRequestOption.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**deleteBranchAfterMerge** | **Boolean** | | [optional]
**forceMerge** | **Boolean** | | [optional]
**headCommitId** | **String** | | [optional]
+**mergeWhenChecksSucceed** | **Boolean** | | [optional]
## Enum: DoEnum
diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md
index 864e46b..2aefc58 100644
--- a/docs/RepositoryApi.md
+++ b/docs/RepositoryApi.md
@@ -17,6 +17,7 @@ Method | HTTP request | Description
[**repoAddTeam**](RepositoryApi.md#repoAddTeam) | **PUT** repos/{owner}/{repo}/teams/{team} | Add a team to a repository
[**repoAddTopic**](RepositoryApi.md#repoAddTopic) | **PUT** repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository
[**repoApplyDiffPatch**](RepositoryApi.md#repoApplyDiffPatch) | **POST** repos/{owner}/{repo}/diffpatch | Apply diff patch to repository
+[**repoCancelScheduledAutoMerge**](RepositoryApi.md#repoCancelScheduledAutoMerge) | **DELETE** repos/{owner}/{repo}/pulls/{index}/merge | Cancel the scheduled auto merge for the given pull request
[**repoCheckCollaborator**](RepositoryApi.md#repoCheckCollaborator) | **GET** repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository
[**repoCheckTeam**](RepositoryApi.md#repoCheckTeam) | **GET** repos/{owner}/{repo}/teams/{team} | Check if a team is assigned to a repository
[**repoCreateBranch**](RepositoryApi.md#repoCreateBranch) | **POST** repos/{owner}/{repo}/branches | Create a branch
@@ -1316,6 +1317,97 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
+
+# **repoCancelScheduledAutoMerge**
+> Void repoCancelScheduledAutoMerge(owner, repo, index)
+
+Cancel the scheduled auto merge for the given pull request
+
+### Example
+```java
+// Import classes:
+//import org.gitnex.tea4j.v2.ApiClient;
+//import org.gitnex.tea4j.v2.ApiException;
+//import org.gitnex.tea4j.v2.Configuration;
+//import org.gitnex.tea4j.v2.auth.*;
+//import org.gitnex.tea4j.v2.apis.RepositoryApi;
+
+ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+// Configure API key authorization: AccessToken
+ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
+AccessToken.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//AccessToken.setApiKeyPrefix("Token");
+
+// Configure API key authorization: AuthorizationHeaderToken
+ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
+AuthorizationHeaderToken.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//AuthorizationHeaderToken.setApiKeyPrefix("Token");
+// Configure HTTP basic authorization: BasicAuth
+HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
+BasicAuth.setUsername("YOUR USERNAME");
+BasicAuth.setPassword("YOUR PASSWORD");
+
+// Configure API key authorization: SudoHeader
+ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
+SudoHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//SudoHeader.setApiKeyPrefix("Token");
+
+// Configure API key authorization: SudoParam
+ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
+SudoParam.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//SudoParam.setApiKeyPrefix("Token");
+
+// Configure API key authorization: TOTPHeader
+ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
+TOTPHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//TOTPHeader.setApiKeyPrefix("Token");
+
+// Configure API key authorization: Token
+ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
+Token.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//Token.setApiKeyPrefix("Token");
+
+RepositoryApi apiInstance = new RepositoryApi();
+String owner = "owner_example"; // String | owner of the repo
+String repo = "repo_example"; // String | name of the repo
+Long index = 789L; // Long | index of the pull request to merge
+try {
+ Void result = apiInstance.repoCancelScheduledAutoMerge(owner, repo, index);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling RepositoryApi#repoCancelScheduledAutoMerge");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **owner** | **String**| owner of the repo |
+ **repo** | **String**| name of the repo |
+ **index** | **Long**| index of the pull request to merge |
+
+### Return type
+
+[**Void**](.md)
+
+### Authorization
+
+[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
# **repoCheckCollaborator**
> Void repoCheckCollaborator(owner, repo, collaborator)
diff --git a/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java b/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java
index ff3d61c..61ed776 100644
--- a/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java
+++ b/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java
@@ -263,6 +263,20 @@ public interface RepositoryApi {
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo);
+ /**
+ * Cancel the scheduled auto merge for the given pull request
+ *
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @param index index of the pull request to merge (required)
+ * @return Call<Void>
+ */
+ @DELETE("repos/{owner}/{repo}/pulls/{index}/merge")
+ Call repoCancelScheduledAutoMerge(
+ @retrofit2.http.Path("owner") String owner,
+ @retrofit2.http.Path("repo") String repo,
+ @retrofit2.http.Path("index") Long index);
+
/**
* Check if a user is a collaborator of a repository
*
diff --git a/src/main/java/org/gitnex/tea4j/v2/models/MergePullRequestOption.java b/src/main/java/org/gitnex/tea4j/v2/models/MergePullRequestOption.java
index 6941299..8276601 100644
--- a/src/main/java/org/gitnex/tea4j/v2/models/MergePullRequestOption.java
+++ b/src/main/java/org/gitnex/tea4j/v2/models/MergePullRequestOption.java
@@ -94,6 +94,9 @@ public class MergePullRequestOption implements Serializable {
@SerializedName("head_commit_id")
private String headCommitId = null;
+ @SerializedName("merge_when_checks_succeed")
+ private Boolean mergeWhenChecksSucceed = null;
+
public MergePullRequestOption _do(DoEnum _do) {
this._do = _do;
return this;
@@ -227,6 +230,25 @@ public class MergePullRequestOption implements Serializable {
this.headCommitId = headCommitId;
}
+ public MergePullRequestOption mergeWhenChecksSucceed(Boolean mergeWhenChecksSucceed) {
+ this.mergeWhenChecksSucceed = mergeWhenChecksSucceed;
+ return this;
+ }
+
+ /**
+ * Get mergeWhenChecksSucceed
+ *
+ * @return mergeWhenChecksSucceed
+ */
+ @Schema(description = "")
+ public Boolean isMergeWhenChecksSucceed() {
+ return mergeWhenChecksSucceed;
+ }
+
+ public void setMergeWhenChecksSucceed(Boolean mergeWhenChecksSucceed) {
+ this.mergeWhenChecksSucceed = mergeWhenChecksSucceed;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -243,7 +265,9 @@ public class MergePullRequestOption implements Serializable {
&& Objects.equals(
this.deleteBranchAfterMerge, mergePullRequestOption.deleteBranchAfterMerge)
&& Objects.equals(this.forceMerge, mergePullRequestOption.forceMerge)
- && Objects.equals(this.headCommitId, mergePullRequestOption.headCommitId);
+ && Objects.equals(this.headCommitId, mergePullRequestOption.headCommitId)
+ && Objects.equals(
+ this.mergeWhenChecksSucceed, mergePullRequestOption.mergeWhenChecksSucceed);
}
@Override
@@ -255,7 +279,8 @@ public class MergePullRequestOption implements Serializable {
mergeTitleField,
deleteBranchAfterMerge,
forceMerge,
- headCommitId);
+ headCommitId,
+ mergeWhenChecksSucceed);
}
@Override
@@ -272,6 +297,9 @@ public class MergePullRequestOption implements Serializable {
.append("\n");
sb.append(" forceMerge: ").append(toIndentedString(forceMerge)).append("\n");
sb.append(" headCommitId: ").append(toIndentedString(headCommitId)).append("\n");
+ sb.append(" mergeWhenChecksSucceed: ")
+ .append(toIndentedString(mergeWhenChecksSucceed))
+ .append("\n");
sb.append("}");
return sb.toString();
}