mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-17 15:10:40 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -86,6 +86,7 @@ import org.gitnex.tea4j.v2.models.PullReviewRequestOptions;
|
||||
import org.gitnex.tea4j.v2.models.PushMirror;
|
||||
import org.gitnex.tea4j.v2.models.Reference;
|
||||
import org.gitnex.tea4j.v2.models.Release;
|
||||
import org.gitnex.tea4j.v2.models.RenameBranchRepoOption;
|
||||
import org.gitnex.tea4j.v2.models.RepoCollaboratorPermission;
|
||||
import org.gitnex.tea4j.v2.models.RepoTopicOptions;
|
||||
import org.gitnex.tea4j.v2.models.Repository;
|
||||
@@ -100,7 +101,6 @@ import org.gitnex.tea4j.v2.models.TopicResponse;
|
||||
import org.gitnex.tea4j.v2.models.TrackedTime;
|
||||
import org.gitnex.tea4j.v2.models.TransferRepoOption;
|
||||
import org.gitnex.tea4j.v2.models.UpdateBranchProtectionPriories;
|
||||
import org.gitnex.tea4j.v2.models.UpdateBranchRepoOption;
|
||||
import org.gitnex.tea4j.v2.models.UpdateFileOptions;
|
||||
import org.gitnex.tea4j.v2.models.UpdateRepoAvatarOption;
|
||||
import org.gitnex.tea4j.v2.models.UpdateVariableOption;
|
||||
@@ -2731,6 +2731,23 @@ public interface RepositoryApi {
|
||||
Call<Void> repoPushMirrorSync(
|
||||
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
|
||||
|
||||
/**
|
||||
* Rename a branch
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param branch name of the branch (required)
|
||||
* @param body (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({"Content-Type:application/json"})
|
||||
@PATCH("repos/{owner}/{repo}/branches/{branch}")
|
||||
Call<Void> repoRenameBranch(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("branch") String branch,
|
||||
@retrofit2.http.Body RenameBranchRepoOption body);
|
||||
|
||||
/**
|
||||
* Search for repositories
|
||||
*
|
||||
@@ -2912,23 +2929,6 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Body UpdateRepoAvatarOption body);
|
||||
|
||||
/**
|
||||
* Update a branch
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param branch name of the branch (required)
|
||||
* @param body (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({"Content-Type:application/json"})
|
||||
@PATCH("repos/{owner}/{repo}/branches/{branch}")
|
||||
Call<Void> repoUpdateBranch(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("branch") String branch,
|
||||
@retrofit2.http.Body UpdateBranchRepoOption body);
|
||||
|
||||
/**
|
||||
* Update the priorities of branch protections for a repository.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Gitea API
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: {{.SwaggerAppVer}}
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
|
||||
/** RenameBranchRepoOption options when renaming a branch in a repository */
|
||||
@Schema(description = "RenameBranchRepoOption options when renaming a branch in a repository")
|
||||
public class RenameBranchRepoOption implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
public RenameBranchRepoOption name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* New branch name
|
||||
*
|
||||
* @return name
|
||||
*/
|
||||
@Schema(required = true, description = "New branch name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
RenameBranchRepoOption renameBranchRepoOption = (RenameBranchRepoOption) o;
|
||||
return Objects.equals(this.name, renameBranchRepoOption.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class RenameBranchRepoOption {\n");
|
||||
|
||||
sb.append(" name: ").append(toIndentedString(name)).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 ");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user