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:
@@ -306,6 +306,20 @@ public interface AdminApi {
|
||||
* @param loginName identifier of the user, provided by the external authenticator (optional)
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param limit page size of results (optional)
|
||||
* @param sort sort users by attribute. Supported values are \"name\",
|
||||
* \"created\", \"updated\" and \"id\". Default is
|
||||
* \"name\" (optional)
|
||||
* @param order sort order, either \"asc\" (ascending) or \"desc\"
|
||||
* (descending). Default is \"asc\", ignored if \"sort\" is not specified.
|
||||
* (optional)
|
||||
* @param q search term (username, full name, email) (optional)
|
||||
* @param visibility visibility filter. Supported values are \"public\",
|
||||
* \"limited\" and \"private\". (optional)
|
||||
* @param isActive filter active users (optional)
|
||||
* @param isAdmin filter admin users (optional)
|
||||
* @param isRestricted filter restricted users (optional)
|
||||
* @param is2faEnabled filter 2FA enabled users (optional)
|
||||
* @param isProhibitLogin filter login prohibited users (optional)
|
||||
* @return Call<List<User>>
|
||||
*/
|
||||
@GET("admin/users")
|
||||
@@ -313,7 +327,16 @@ public interface AdminApi {
|
||||
@retrofit2.http.Query("source_id") Long sourceId,
|
||||
@retrofit2.http.Query("login_name") String loginName,
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
@retrofit2.http.Query("limit") Integer limit,
|
||||
@retrofit2.http.Query("sort") String sort,
|
||||
@retrofit2.http.Query("order") String order,
|
||||
@retrofit2.http.Query("q") String q,
|
||||
@retrofit2.http.Query("visibility") String visibility,
|
||||
@retrofit2.http.Query("is_active") Boolean isActive,
|
||||
@retrofit2.http.Query("is_admin") Boolean isAdmin,
|
||||
@retrofit2.http.Query("is_restricted") Boolean isRestricted,
|
||||
@retrofit2.http.Query("is_2fa_enabled") Boolean is2faEnabled,
|
||||
@retrofit2.http.Query("is_prohibit_login") Boolean isProhibitLogin);
|
||||
|
||||
/**
|
||||
* List unadopted repositories
|
||||
|
||||
@@ -1058,7 +1058,6 @@ public interface IssueApi {
|
||||
* @param milestones Comma-separated list of milestone names. Fetch only issues that have any of
|
||||
* these milestones. Non existent milestones are discarded. (optional)
|
||||
* @param q Search string (optional)
|
||||
* @param priorityRepoId Repository ID to prioritize in the results (optional)
|
||||
* @param type Filter by issue type (optional)
|
||||
* @param since Only show issues updated after the given time (RFC 3339 format) (optional)
|
||||
* @param before Only show issues updated before the given time (RFC 3339 format) (optional)
|
||||
@@ -1084,7 +1083,6 @@ public interface IssueApi {
|
||||
@retrofit2.http.Query("labels") String labels,
|
||||
@retrofit2.http.Query("milestones") String milestones,
|
||||
@retrofit2.http.Query("q") String q,
|
||||
@retrofit2.http.Query("priority_repo_id") Long priorityRepoId,
|
||||
@retrofit2.http.Query("type") String type,
|
||||
@retrofit2.http.Query("since") Date since,
|
||||
@retrofit2.http.Query("before") Date before,
|
||||
|
||||
@@ -102,6 +102,7 @@ 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;
|
||||
@@ -2930,6 +2931,23 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Body UpdateRepoAvatarOption body);
|
||||
|
||||
/**
|
||||
* Update a branch reference to a new commit
|
||||
*
|
||||
* @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"})
|
||||
@PUT("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.
|
||||
*
|
||||
|
||||
@@ -17,31 +17,78 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/** UpdateBranchRepoOption options when updating a branch in a repository */
|
||||
@Schema(description = "UpdateBranchRepoOption options when updating a branch in a repository")
|
||||
/** UpdateBranchRepoOption options when updating a branch reference in a repository */
|
||||
@Schema(
|
||||
description = "UpdateBranchRepoOption options when updating a branch reference in a repository")
|
||||
public class UpdateBranchRepoOption implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
@SerializedName("force")
|
||||
private Boolean force = null;
|
||||
|
||||
public UpdateBranchRepoOption name(String name) {
|
||||
this.name = name;
|
||||
@SerializedName("new_commit_id")
|
||||
private String newCommitId = null;
|
||||
|
||||
@SerializedName("old_commit_id")
|
||||
private String oldCommitId = null;
|
||||
|
||||
public UpdateBranchRepoOption force(Boolean force) {
|
||||
this.force = force;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* New branch name
|
||||
* Force update even if the change is not a fast-forward
|
||||
*
|
||||
* @return name
|
||||
* @return force
|
||||
*/
|
||||
@Schema(required = true, description = "New branch name")
|
||||
public String getName() {
|
||||
return name;
|
||||
@Schema(description = "Force update even if the change is not a fast-forward")
|
||||
public Boolean isForce() {
|
||||
return force;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
public void setForce(Boolean force) {
|
||||
this.force = force;
|
||||
}
|
||||
|
||||
public UpdateBranchRepoOption newCommitId(String newCommitId) {
|
||||
this.newCommitId = newCommitId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* New commit SHA (or any ref) the branch should point to
|
||||
*
|
||||
* @return newCommitId
|
||||
*/
|
||||
@Schema(required = true, description = "New commit SHA (or any ref) the branch should point to")
|
||||
public String getNewCommitId() {
|
||||
return newCommitId;
|
||||
}
|
||||
|
||||
public void setNewCommitId(String newCommitId) {
|
||||
this.newCommitId = newCommitId;
|
||||
}
|
||||
|
||||
public UpdateBranchRepoOption oldCommitId(String oldCommitId) {
|
||||
this.oldCommitId = oldCommitId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expected old commit SHA of the branch; if provided it must match the current tip
|
||||
*
|
||||
* @return oldCommitId
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"Expected old commit SHA of the branch; if provided it must match the current tip")
|
||||
public String getOldCommitId() {
|
||||
return oldCommitId;
|
||||
}
|
||||
|
||||
public void setOldCommitId(String oldCommitId) {
|
||||
this.oldCommitId = oldCommitId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,12 +100,14 @@ public class UpdateBranchRepoOption implements Serializable {
|
||||
return false;
|
||||
}
|
||||
UpdateBranchRepoOption updateBranchRepoOption = (UpdateBranchRepoOption) o;
|
||||
return Objects.equals(this.name, updateBranchRepoOption.name);
|
||||
return Objects.equals(this.force, updateBranchRepoOption.force)
|
||||
&& Objects.equals(this.newCommitId, updateBranchRepoOption.newCommitId)
|
||||
&& Objects.equals(this.oldCommitId, updateBranchRepoOption.oldCommitId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name);
|
||||
return Objects.hash(force, newCommitId, oldCommitId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,7 +115,9 @@ public class UpdateBranchRepoOption implements Serializable {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class UpdateBranchRepoOption {\n");
|
||||
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" force: ").append(toIndentedString(force)).append("\n");
|
||||
sb.append(" newCommitId: ").append(toIndentedString(newCommitId)).append("\n");
|
||||
sb.append(" oldCommitId: ").append(toIndentedString(oldCommitId)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user