mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-04 16:52:17 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -1148,4 +1148,48 @@ public interface IssueApi {
|
||||
@retrofit2.http.Query("before") Date before,
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* Moves the Pin to the given Position
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of issue (required)
|
||||
* @param position the new position (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@PATCH("repos/{owner}/{repo}/issues/{index}/pin/{position}")
|
||||
Call<Void> moveIssuePin(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index,
|
||||
@retrofit2.http.Path("position") Long position);
|
||||
|
||||
/**
|
||||
* Pin an Issue
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of issue to pin (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@POST("repos/{owner}/{repo}/issues/{index}/pin")
|
||||
Call<Void> pinIssue(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index);
|
||||
|
||||
/**
|
||||
* Unpin an Issue
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of issue to unpin (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@DELETE("repos/{owner}/{repo}/issues/{index}/pin")
|
||||
Call<Void> unpinIssue(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index);
|
||||
}
|
||||
|
||||
@@ -47,11 +47,13 @@ import org.gitnex.tea4j.v2.models.GitBlobResponse;
|
||||
import org.gitnex.tea4j.v2.models.GitHook;
|
||||
import org.gitnex.tea4j.v2.models.GitTreeResponse;
|
||||
import org.gitnex.tea4j.v2.models.Hook;
|
||||
import org.gitnex.tea4j.v2.models.Issue;
|
||||
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.MigrateRepoOptions;
|
||||
import org.gitnex.tea4j.v2.models.NewIssuePinsAllowed;
|
||||
import org.gitnex.tea4j.v2.models.Note;
|
||||
import org.gitnex.tea4j.v2.models.PullRequest;
|
||||
import org.gitnex.tea4j.v2.models.PullReview;
|
||||
@@ -1675,6 +1677,28 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* List a repo's pinned issues
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @return Call<List<Issue>>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/issues/pinned")
|
||||
Call<List<Issue>> repoListPinnedIssues(
|
||||
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
|
||||
|
||||
/**
|
||||
* List a repo's pinned pull requests
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @return Call<List<PullRequest>>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/pulls/pinned")
|
||||
Call<List<PullRequest>> repoListPinnedPullRequests(
|
||||
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
|
||||
|
||||
/**
|
||||
* List a repo's pull requests
|
||||
*
|
||||
@@ -1927,6 +1951,17 @@ public interface RepositoryApi {
|
||||
Call<Void> repoMirrorSync(
|
||||
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
|
||||
|
||||
/**
|
||||
* Returns if new Issue Pins are allowed
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @return Call<NewIssuePinsAllowed>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/new_pin_allowed")
|
||||
Call<NewIssuePinsAllowed> repoNewPinAllowed(
|
||||
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
|
||||
|
||||
/**
|
||||
* Check if a pull request has been merged
|
||||
*
|
||||
|
||||
@@ -73,6 +73,9 @@ public class Issue implements Serializable {
|
||||
@SerializedName("original_author_id")
|
||||
private Long originalAuthorId = null;
|
||||
|
||||
@SerializedName("pin_order")
|
||||
private Long pinOrder = null;
|
||||
|
||||
@SerializedName("pull_request")
|
||||
private PullRequestMeta pullRequest = null;
|
||||
|
||||
@@ -425,6 +428,25 @@ public class Issue implements Serializable {
|
||||
this.originalAuthorId = originalAuthorId;
|
||||
}
|
||||
|
||||
public Issue pinOrder(Long pinOrder) {
|
||||
this.pinOrder = pinOrder;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pinOrder
|
||||
*
|
||||
* @return pinOrder
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Long getPinOrder() {
|
||||
return pinOrder;
|
||||
}
|
||||
|
||||
public void setPinOrder(Long pinOrder) {
|
||||
this.pinOrder = pinOrder;
|
||||
}
|
||||
|
||||
public Issue pullRequest(PullRequestMeta pullRequest) {
|
||||
this.pullRequest = pullRequest;
|
||||
return this;
|
||||
@@ -602,6 +624,7 @@ public class Issue implements Serializable {
|
||||
&& Objects.equals(this.number, issue.number)
|
||||
&& Objects.equals(this.originalAuthor, issue.originalAuthor)
|
||||
&& Objects.equals(this.originalAuthorId, issue.originalAuthorId)
|
||||
&& Objects.equals(this.pinOrder, issue.pinOrder)
|
||||
&& Objects.equals(this.pullRequest, issue.pullRequest)
|
||||
&& Objects.equals(this.ref, issue.ref)
|
||||
&& Objects.equals(this.repository, issue.repository)
|
||||
@@ -631,6 +654,7 @@ public class Issue implements Serializable {
|
||||
number,
|
||||
originalAuthor,
|
||||
originalAuthorId,
|
||||
pinOrder,
|
||||
pullRequest,
|
||||
ref,
|
||||
repository,
|
||||
@@ -662,6 +686,7 @@ public class Issue implements Serializable {
|
||||
sb.append(" number: ").append(toIndentedString(number)).append("\n");
|
||||
sb.append(" originalAuthor: ").append(toIndentedString(originalAuthor)).append("\n");
|
||||
sb.append(" originalAuthorId: ").append(toIndentedString(originalAuthorId)).append("\n");
|
||||
sb.append(" pinOrder: ").append(toIndentedString(pinOrder)).append("\n");
|
||||
sb.append(" pullRequest: ").append(toIndentedString(pullRequest)).append("\n");
|
||||
sb.append(" ref: ").append(toIndentedString(ref)).append("\n");
|
||||
sb.append(" repository: ").append(toIndentedString(repository)).append("\n");
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: {{AppVer | JSEscape | Safe}}
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
|
||||
/** NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed */
|
||||
@Schema(
|
||||
description =
|
||||
"NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed")
|
||||
public class NewIssuePinsAllowed implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("issues")
|
||||
private Boolean issues = null;
|
||||
|
||||
@SerializedName("pull_requests")
|
||||
private Boolean pullRequests = null;
|
||||
|
||||
public NewIssuePinsAllowed issues(Boolean issues) {
|
||||
this.issues = issues;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get issues
|
||||
*
|
||||
* @return issues
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Boolean isIssues() {
|
||||
return issues;
|
||||
}
|
||||
|
||||
public void setIssues(Boolean issues) {
|
||||
this.issues = issues;
|
||||
}
|
||||
|
||||
public NewIssuePinsAllowed pullRequests(Boolean pullRequests) {
|
||||
this.pullRequests = pullRequests;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pullRequests
|
||||
*
|
||||
* @return pullRequests
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Boolean isPullRequests() {
|
||||
return pullRequests;
|
||||
}
|
||||
|
||||
public void setPullRequests(Boolean pullRequests) {
|
||||
this.pullRequests = pullRequests;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
NewIssuePinsAllowed newIssuePinsAllowed = (NewIssuePinsAllowed) o;
|
||||
return Objects.equals(this.issues, newIssuePinsAllowed.issues)
|
||||
&& Objects.equals(this.pullRequests, newIssuePinsAllowed.pullRequests);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(issues, pullRequests);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class NewIssuePinsAllowed {\n");
|
||||
|
||||
sb.append(" issues: ").append(toIndentedString(issues)).append("\n");
|
||||
sb.append(" pullRequests: ").append(toIndentedString(pullRequests)).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 ");
|
||||
}
|
||||
}
|
||||
@@ -97,6 +97,12 @@ public class PullRequest implements Serializable {
|
||||
@SerializedName("patch_url")
|
||||
private String patchUrl = null;
|
||||
|
||||
@SerializedName("pin_order")
|
||||
private Long pinOrder = null;
|
||||
|
||||
@SerializedName("requested_reviewers")
|
||||
private List<User> requestedReviewers = null;
|
||||
|
||||
@SerializedName("state")
|
||||
private String state = null;
|
||||
|
||||
@@ -584,6 +590,52 @@ public class PullRequest implements Serializable {
|
||||
this.patchUrl = patchUrl;
|
||||
}
|
||||
|
||||
public PullRequest pinOrder(Long pinOrder) {
|
||||
this.pinOrder = pinOrder;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pinOrder
|
||||
*
|
||||
* @return pinOrder
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Long getPinOrder() {
|
||||
return pinOrder;
|
||||
}
|
||||
|
||||
public void setPinOrder(Long pinOrder) {
|
||||
this.pinOrder = pinOrder;
|
||||
}
|
||||
|
||||
public PullRequest requestedReviewers(List<User> requestedReviewers) {
|
||||
this.requestedReviewers = requestedReviewers;
|
||||
return this;
|
||||
}
|
||||
|
||||
public PullRequest addRequestedReviewersItem(User requestedReviewersItem) {
|
||||
if (this.requestedReviewers == null) {
|
||||
this.requestedReviewers = new ArrayList<>();
|
||||
}
|
||||
this.requestedReviewers.add(requestedReviewersItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get requestedReviewers
|
||||
*
|
||||
* @return requestedReviewers
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public List<User> getRequestedReviewers() {
|
||||
return requestedReviewers;
|
||||
}
|
||||
|
||||
public void setRequestedReviewers(List<User> requestedReviewers) {
|
||||
this.requestedReviewers = requestedReviewers;
|
||||
}
|
||||
|
||||
public PullRequest state(String state) {
|
||||
this.state = state;
|
||||
return this;
|
||||
@@ -712,6 +764,8 @@ public class PullRequest implements Serializable {
|
||||
&& Objects.equals(this.milestone, pullRequest.milestone)
|
||||
&& Objects.equals(this.number, pullRequest.number)
|
||||
&& Objects.equals(this.patchUrl, pullRequest.patchUrl)
|
||||
&& Objects.equals(this.pinOrder, pullRequest.pinOrder)
|
||||
&& Objects.equals(this.requestedReviewers, pullRequest.requestedReviewers)
|
||||
&& Objects.equals(this.state, pullRequest.state)
|
||||
&& Objects.equals(this.title, pullRequest.title)
|
||||
&& Objects.equals(this.updatedAt, pullRequest.updatedAt)
|
||||
@@ -746,6 +800,8 @@ public class PullRequest implements Serializable {
|
||||
milestone,
|
||||
number,
|
||||
patchUrl,
|
||||
pinOrder,
|
||||
requestedReviewers,
|
||||
state,
|
||||
title,
|
||||
updatedAt,
|
||||
@@ -784,6 +840,8 @@ public class PullRequest implements Serializable {
|
||||
sb.append(" milestone: ").append(toIndentedString(milestone)).append("\n");
|
||||
sb.append(" number: ").append(toIndentedString(number)).append("\n");
|
||||
sb.append(" patchUrl: ").append(toIndentedString(patchUrl)).append("\n");
|
||||
sb.append(" pinOrder: ").append(toIndentedString(pinOrder)).append("\n");
|
||||
sb.append(" requestedReviewers: ").append(toIndentedString(requestedReviewers)).append("\n");
|
||||
sb.append(" state: ").append(toIndentedString(state)).append("\n");
|
||||
sb.append(" title: ").append(toIndentedString(title)).append("\n");
|
||||
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
|
||||
|
||||
Reference in New Issue
Block a user