Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2025-01-11 00:21:39 +00:00
parent 9462750b50
commit 3de5ba6d7c
6 changed files with 285 additions and 0 deletions
@@ -63,6 +63,8 @@ import org.gitnex.tea4j.v2.models.IssueConfig;
import org.gitnex.tea4j.v2.models.IssueConfigValidation;
import org.gitnex.tea4j.v2.models.IssueTemplate;
import org.gitnex.tea4j.v2.models.MergePullRequestOption;
import org.gitnex.tea4j.v2.models.MergeUpstreamRequest;
import org.gitnex.tea4j.v2.models.MergeUpstreamResponse;
import org.gitnex.tea4j.v2.models.MigrateRepoOptions;
import org.gitnex.tea4j.v2.models.NewIssuePinsAllowed;
import org.gitnex.tea4j.v2.models.Note;
@@ -2250,6 +2252,21 @@ public interface RepositoryApi {
@retrofit2.http.Path("index") Long index,
@retrofit2.http.Body MergePullRequestOption body);
/**
* Merge a branch from upstream
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param body (optional)
* @return Call<MergeUpstreamResponse>
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/merge-upstream")
Call<MergeUpstreamResponse> repoMergeUpstream(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Body MergeUpstreamRequest body);
/**
* Migrate a remote git repository
*
@@ -0,0 +1,82 @@
/*
* Gitea API
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape}}
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package org.gitnex.tea4j.v2.models;
import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Objects;
/** MergeUpstreamRequest */
public class MergeUpstreamRequest implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("branch")
private String branch = null;
public MergeUpstreamRequest branch(String branch) {
this.branch = branch;
return this;
}
/**
* Get branch
*
* @return branch
*/
@Schema(description = "")
public String getBranch() {
return branch;
}
public void setBranch(String branch) {
this.branch = branch;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MergeUpstreamRequest mergeUpstreamRequest = (MergeUpstreamRequest) o;
return Objects.equals(this.branch, mergeUpstreamRequest.branch);
}
@Override
public int hashCode() {
return Objects.hash(branch);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MergeUpstreamRequest {\n");
sb.append(" branch: ").append(toIndentedString(branch)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
@@ -0,0 +1,82 @@
/*
* Gitea API
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape}}
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package org.gitnex.tea4j.v2.models;
import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Objects;
/** MergeUpstreamResponse */
public class MergeUpstreamResponse implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("merge_type")
private String mergeType = null;
public MergeUpstreamResponse mergeType(String mergeType) {
this.mergeType = mergeType;
return this;
}
/**
* Get mergeType
*
* @return mergeType
*/
@Schema(description = "")
public String getMergeType() {
return mergeType;
}
public void setMergeType(String mergeType) {
this.mergeType = mergeType;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MergeUpstreamResponse mergeUpstreamResponse = (MergeUpstreamResponse) o;
return Objects.equals(this.mergeType, mergeUpstreamResponse.mergeType);
}
@Override
public int hashCode() {
return Objects.hash(mergeType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MergeUpstreamResponse {\n");
sb.append(" mergeType: ").append(toIndentedString(mergeType)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}