mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-05 01:02:18 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -10,6 +10,7 @@ import org.gitnex.tea4j.v2.models.AnnotatedTag;
|
||||
import org.gitnex.tea4j.v2.models.Attachment;
|
||||
import org.gitnex.tea4j.v2.models.Branch;
|
||||
import org.gitnex.tea4j.v2.models.BranchProtection;
|
||||
import org.gitnex.tea4j.v2.models.ChangedFile;
|
||||
import org.gitnex.tea4j.v2.models.CombinedStatus;
|
||||
import org.gitnex.tea4j.v2.models.Commit;
|
||||
import org.gitnex.tea4j.v2.models.CommitStatus;
|
||||
@@ -1251,6 +1252,28 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* Get changed files for a pull request
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param index index of the pull request to get (required)
|
||||
* @param skipTo skip to given file (optional)
|
||||
* @param whitespace whitespace behavior (optional)
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param limit page size of results (optional)
|
||||
* @return Call<List<ChangedFile>>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/pulls/{index}/files")
|
||||
Call<List<ChangedFile>> repoGetPullRequestFiles(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("index") Long index,
|
||||
@retrofit2.http.Query("skip-to") String skipTo,
|
||||
@retrofit2.http.Query("whitespace") String whitespace,
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* Get a specific review for a pull request
|
||||
*
|
||||
|
||||
@@ -0,0 +1,284 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/** ChangedFile store information about files affected by the pull request */
|
||||
@Schema(description = "ChangedFile store information about files affected by the pull request")
|
||||
public class ChangedFile implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("additions")
|
||||
private Long additions = null;
|
||||
|
||||
@SerializedName("changes")
|
||||
private Long changes = null;
|
||||
|
||||
@SerializedName("contents_url")
|
||||
private String contentsUrl = null;
|
||||
|
||||
@SerializedName("deletions")
|
||||
private Long deletions = null;
|
||||
|
||||
@SerializedName("filename")
|
||||
private String filename = null;
|
||||
|
||||
@SerializedName("html_url")
|
||||
private String htmlUrl = null;
|
||||
|
||||
@SerializedName("previous_filename")
|
||||
private String previousFilename = null;
|
||||
|
||||
@SerializedName("raw_url")
|
||||
private String rawUrl = null;
|
||||
|
||||
@SerializedName("status")
|
||||
private String status = null;
|
||||
|
||||
public ChangedFile additions(Long additions) {
|
||||
this.additions = additions;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get additions
|
||||
*
|
||||
* @return additions
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Long getAdditions() {
|
||||
return additions;
|
||||
}
|
||||
|
||||
public void setAdditions(Long additions) {
|
||||
this.additions = additions;
|
||||
}
|
||||
|
||||
public ChangedFile changes(Long changes) {
|
||||
this.changes = changes;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get changes
|
||||
*
|
||||
* @return changes
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Long getChanges() {
|
||||
return changes;
|
||||
}
|
||||
|
||||
public void setChanges(Long changes) {
|
||||
this.changes = changes;
|
||||
}
|
||||
|
||||
public ChangedFile contentsUrl(String contentsUrl) {
|
||||
this.contentsUrl = contentsUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get contentsUrl
|
||||
*
|
||||
* @return contentsUrl
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getContentsUrl() {
|
||||
return contentsUrl;
|
||||
}
|
||||
|
||||
public void setContentsUrl(String contentsUrl) {
|
||||
this.contentsUrl = contentsUrl;
|
||||
}
|
||||
|
||||
public ChangedFile deletions(Long deletions) {
|
||||
this.deletions = deletions;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get deletions
|
||||
*
|
||||
* @return deletions
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Long getDeletions() {
|
||||
return deletions;
|
||||
}
|
||||
|
||||
public void setDeletions(Long deletions) {
|
||||
this.deletions = deletions;
|
||||
}
|
||||
|
||||
public ChangedFile filename(String filename) {
|
||||
this.filename = filename;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get filename
|
||||
*
|
||||
* @return filename
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getFilename() {
|
||||
return filename;
|
||||
}
|
||||
|
||||
public void setFilename(String filename) {
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
public ChangedFile htmlUrl(String htmlUrl) {
|
||||
this.htmlUrl = htmlUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get htmlUrl
|
||||
*
|
||||
* @return htmlUrl
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getHtmlUrl() {
|
||||
return htmlUrl;
|
||||
}
|
||||
|
||||
public void setHtmlUrl(String htmlUrl) {
|
||||
this.htmlUrl = htmlUrl;
|
||||
}
|
||||
|
||||
public ChangedFile previousFilename(String previousFilename) {
|
||||
this.previousFilename = previousFilename;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get previousFilename
|
||||
*
|
||||
* @return previousFilename
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getPreviousFilename() {
|
||||
return previousFilename;
|
||||
}
|
||||
|
||||
public void setPreviousFilename(String previousFilename) {
|
||||
this.previousFilename = previousFilename;
|
||||
}
|
||||
|
||||
public ChangedFile rawUrl(String rawUrl) {
|
||||
this.rawUrl = rawUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get rawUrl
|
||||
*
|
||||
* @return rawUrl
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getRawUrl() {
|
||||
return rawUrl;
|
||||
}
|
||||
|
||||
public void setRawUrl(String rawUrl) {
|
||||
this.rawUrl = rawUrl;
|
||||
}
|
||||
|
||||
public ChangedFile status(String status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status
|
||||
*
|
||||
* @return status
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ChangedFile changedFile = (ChangedFile) o;
|
||||
return Objects.equals(this.additions, changedFile.additions)
|
||||
&& Objects.equals(this.changes, changedFile.changes)
|
||||
&& Objects.equals(this.contentsUrl, changedFile.contentsUrl)
|
||||
&& Objects.equals(this.deletions, changedFile.deletions)
|
||||
&& Objects.equals(this.filename, changedFile.filename)
|
||||
&& Objects.equals(this.htmlUrl, changedFile.htmlUrl)
|
||||
&& Objects.equals(this.previousFilename, changedFile.previousFilename)
|
||||
&& Objects.equals(this.rawUrl, changedFile.rawUrl)
|
||||
&& Objects.equals(this.status, changedFile.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
additions,
|
||||
changes,
|
||||
contentsUrl,
|
||||
deletions,
|
||||
filename,
|
||||
htmlUrl,
|
||||
previousFilename,
|
||||
rawUrl,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ChangedFile {\n");
|
||||
|
||||
sb.append(" additions: ").append(toIndentedString(additions)).append("\n");
|
||||
sb.append(" changes: ").append(toIndentedString(changes)).append("\n");
|
||||
sb.append(" contentsUrl: ").append(toIndentedString(contentsUrl)).append("\n");
|
||||
sb.append(" deletions: ").append(toIndentedString(deletions)).append("\n");
|
||||
sb.append(" filename: ").append(toIndentedString(filename)).append("\n");
|
||||
sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n");
|
||||
sb.append(" previousFilename: ").append(toIndentedString(previousFilename)).append("\n");
|
||||
sb.append(" rawUrl: ").append(toIndentedString(rawUrl)).append("\n");
|
||||
sb.append(" status: ").append(toIndentedString(status)).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 ");
|
||||
}
|
||||
}
|
||||
@@ -107,14 +107,12 @@ public class EditRepoOption implements Serializable {
|
||||
|
||||
/**
|
||||
* either `true` to allow mark pr as merged manually, or `false` to prevent
|
||||
* it. `has_pull_requests` must be `true`.
|
||||
* it.
|
||||
*
|
||||
* @return allowManualMerge
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"either `true` to allow mark pr as merged manually, or `false` to prevent it."
|
||||
+ " `has_pull_requests` must be `true`.")
|
||||
description = "either `true` to allow mark pr as merged manually, or `false` to prevent it.")
|
||||
public Boolean isAllowManualMerge() {
|
||||
return allowManualMerge;
|
||||
}
|
||||
@@ -131,14 +129,13 @@ public class EditRepoOption implements Serializable {
|
||||
/**
|
||||
* either `true` to allow merging pull requests with a merge commit, or
|
||||
* `false` to prevent merging pull requests with merge commits.
|
||||
* `has_pull_requests` must be `true`.
|
||||
*
|
||||
* @return allowMergeCommits
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"either `true` to allow merging pull requests with a merge commit, or `false` to prevent"
|
||||
+ " merging pull requests with merge commits. `has_pull_requests` must be `true`.")
|
||||
+ " merging pull requests with merge commits.")
|
||||
public Boolean isAllowMergeCommits() {
|
||||
return allowMergeCommits;
|
||||
}
|
||||
@@ -154,14 +151,14 @@ public class EditRepoOption implements Serializable {
|
||||
|
||||
/**
|
||||
* either `true` to allow rebase-merging pull requests, or `false` to prevent
|
||||
* rebase-merging. `has_pull_requests` must be `true`.
|
||||
* rebase-merging.
|
||||
*
|
||||
* @return allowRebase
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"either `true` to allow rebase-merging pull requests, or `false` to prevent"
|
||||
+ " rebase-merging. `has_pull_requests` must be `true`.")
|
||||
+ " rebase-merging.")
|
||||
public Boolean isAllowRebase() {
|
||||
return allowRebase;
|
||||
}
|
||||
@@ -177,15 +174,14 @@ public class EditRepoOption implements Serializable {
|
||||
|
||||
/**
|
||||
* either `true` to allow rebase with explicit merge commits (--no-ff), or
|
||||
* `false` to prevent rebase with explicit merge commits. `has_pull_requests`
|
||||
* must be `true`.
|
||||
* `false` to prevent rebase with explicit merge commits.
|
||||
*
|
||||
* @return allowRebaseExplicit
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to"
|
||||
+ " prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.")
|
||||
+ " prevent rebase with explicit merge commits.")
|
||||
public Boolean isAllowRebaseExplicit() {
|
||||
return allowRebaseExplicit;
|
||||
}
|
||||
@@ -201,14 +197,14 @@ public class EditRepoOption implements Serializable {
|
||||
|
||||
/**
|
||||
* either `true` to allow updating pull request branch by rebase, or `false`
|
||||
* to prevent it. `has_pull_requests` must be `true`.
|
||||
* to prevent it.
|
||||
*
|
||||
* @return allowRebaseUpdate
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"either `true` to allow updating pull request branch by rebase, or `false` to prevent it."
|
||||
+ " `has_pull_requests` must be `true`.")
|
||||
"either `true` to allow updating pull request branch by rebase, or `false` to prevent"
|
||||
+ " it.")
|
||||
public Boolean isAllowRebaseUpdate() {
|
||||
return allowRebaseUpdate;
|
||||
}
|
||||
@@ -224,14 +220,14 @@ public class EditRepoOption implements Serializable {
|
||||
|
||||
/**
|
||||
* either `true` to allow squash-merging pull requests, or `false` to prevent
|
||||
* squash-merging. `has_pull_requests` must be `true`.
|
||||
* squash-merging.
|
||||
*
|
||||
* @return allowSquashMerge
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"either `true` to allow squash-merging pull requests, or `false` to prevent"
|
||||
+ " squash-merging. `has_pull_requests` must be `true`.")
|
||||
+ " squash-merging.")
|
||||
public Boolean isAllowSquashMerge() {
|
||||
return allowSquashMerge;
|
||||
}
|
||||
@@ -266,16 +262,14 @@ public class EditRepoOption implements Serializable {
|
||||
|
||||
/**
|
||||
* either `true` to enable AutodetectManualMerge, or `false` to prevent it.
|
||||
* `has_pull_requests` must be `true`, Note: In some special cases,
|
||||
* misjudgments can occur.
|
||||
* Note: In some special cases, misjudgments can occur.
|
||||
*
|
||||
* @return autodetectManualMerge
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"either `true` to enable AutodetectManualMerge, or `false` to prevent it."
|
||||
+ " `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can"
|
||||
+ " occur.")
|
||||
"either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some"
|
||||
+ " special cases, misjudgments can occur.")
|
||||
public Boolean isAutodetectManualMerge() {
|
||||
return autodetectManualMerge;
|
||||
}
|
||||
@@ -329,15 +323,14 @@ public class EditRepoOption implements Serializable {
|
||||
|
||||
/**
|
||||
* set to a merge style to be used by this repository: \"merge\", \"rebase\",
|
||||
* \"rebase-merge\", or \"squash\". `has_pull_requests` must be
|
||||
* `true`.
|
||||
* \"rebase-merge\", or \"squash\".
|
||||
*
|
||||
* @return defaultMergeStyle
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"set to a merge style to be used by this repository: \"merge\", \"rebase\","
|
||||
+ " \"rebase-merge\", or \"squash\". `has_pull_requests` must be `true`.")
|
||||
+ " \"rebase-merge\", or \"squash\".")
|
||||
public String getDefaultMergeStyle() {
|
||||
return defaultMergeStyle;
|
||||
}
|
||||
@@ -511,14 +504,13 @@ public class EditRepoOption implements Serializable {
|
||||
|
||||
/**
|
||||
* either `true` to ignore whitespace for conflicts, or `false` to not ignore
|
||||
* whitespace. `has_pull_requests` must be `true`.
|
||||
* whitespace.
|
||||
*
|
||||
* @return ignoreWhitespaceConflicts
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace."
|
||||
+ " `has_pull_requests` must be `true`.")
|
||||
"either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace.")
|
||||
public Boolean isIgnoreWhitespaceConflicts() {
|
||||
return ignoreWhitespaceConflicts;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,9 @@ public class Organization implements Serializable {
|
||||
@SerializedName("location")
|
||||
private String location = null;
|
||||
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
@SerializedName("repo_admin_change_team_access")
|
||||
private Boolean repoAdminChangeTeamAccess = null;
|
||||
|
||||
@@ -144,6 +147,25 @@ public class Organization implements Serializable {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public Organization name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @return name
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Organization repoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) {
|
||||
this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess;
|
||||
return this;
|
||||
@@ -169,11 +191,11 @@ public class Organization implements Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get username
|
||||
* deprecated
|
||||
*
|
||||
* @return username
|
||||
*/
|
||||
@Schema(description = "")
|
||||
@Schema(description = "deprecated")
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
@@ -234,6 +256,7 @@ public class Organization implements Serializable {
|
||||
&& Objects.equals(this.fullName, organization.fullName)
|
||||
&& Objects.equals(this.id, organization.id)
|
||||
&& Objects.equals(this.location, organization.location)
|
||||
&& Objects.equals(this.name, organization.name)
|
||||
&& Objects.equals(this.repoAdminChangeTeamAccess, organization.repoAdminChangeTeamAccess)
|
||||
&& Objects.equals(this.username, organization.username)
|
||||
&& Objects.equals(this.visibility, organization.visibility)
|
||||
@@ -248,6 +271,7 @@ public class Organization implements Serializable {
|
||||
fullName,
|
||||
id,
|
||||
location,
|
||||
name,
|
||||
repoAdminChangeTeamAccess,
|
||||
username,
|
||||
visibility,
|
||||
@@ -264,6 +288,7 @@ public class Organization implements Serializable {
|
||||
sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" location: ").append(toIndentedString(location)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" repoAdminChangeTeamAccess: ")
|
||||
.append(toIndentedString(repoAdminChangeTeamAccess))
|
||||
.append("\n");
|
||||
|
||||
Reference in New Issue
Block a user