mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
Merge branch 'master' into feature-activitypub
This commit is contained in:
+566
-35
@@ -1526,7 +1526,7 @@
|
||||
"204": {
|
||||
"description": "user is a member"
|
||||
},
|
||||
"302": {
|
||||
"303": {
|
||||
"description": "redirection to /orgs/{org}/public_members/{username}"
|
||||
},
|
||||
"404": {
|
||||
@@ -1922,6 +1922,213 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/packages/{owner}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"package"
|
||||
],
|
||||
"summary": "Gets all packages of an owner",
|
||||
"operationId": "listPackages",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the packages",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "page number of results to return (1-based)",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "page size of results",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"composer",
|
||||
"conan",
|
||||
"container",
|
||||
"generic",
|
||||
"helm",
|
||||
"maven",
|
||||
"npm",
|
||||
"nuget",
|
||||
"pypi",
|
||||
"rubygems"
|
||||
],
|
||||
"type": "string",
|
||||
"description": "package type filter",
|
||||
"name": "type",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name filter",
|
||||
"name": "q",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/PackageList"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/packages/{owner}/{type}/{name}/{version}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"package"
|
||||
],
|
||||
"summary": "Gets a package",
|
||||
"operationId": "getPackage",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the package",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "type of the package",
|
||||
"name": "type",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the package",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "version of the package",
|
||||
"name": "version",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/Package"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"package"
|
||||
],
|
||||
"summary": "Delete a package",
|
||||
"operationId": "deletePackage",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the package",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "type of the package",
|
||||
"name": "type",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the package",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "version of the package",
|
||||
"name": "version",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/packages/{owner}/{type}/{name}/{version}/files": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"package"
|
||||
],
|
||||
"summary": "Gets all files of a package",
|
||||
"operationId": "listPackageFiles",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the package",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "type of the package",
|
||||
"name": "type",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the package",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "version of the package",
|
||||
"name": "version",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/PackageFileList"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/issues/search": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -2069,6 +2276,9 @@
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
},
|
||||
"409": {
|
||||
"description": "The repository with the same name already exists."
|
||||
},
|
||||
"422": {
|
||||
"$ref": "#/responses/validationError"
|
||||
}
|
||||
@@ -2971,6 +3181,52 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/collaborators/{collaborator}/permission": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository"
|
||||
],
|
||||
"summary": "Get repository permissions for a user",
|
||||
"operationId": "repoGetRepoPermissions",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "username of the collaborator",
|
||||
"name": "collaborator",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/RepoCollaboratorPermission"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/commits": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -3510,6 +3766,12 @@
|
||||
"name": "filepath",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
|
||||
"name": "ref",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -4401,6 +4663,12 @@
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
|
||||
"name": "ref",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -7799,6 +8067,51 @@
|
||||
"$ref": "#/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository"
|
||||
],
|
||||
"summary": "Cancel the scheduled auto merge for the given pull request",
|
||||
"operationId": "repoCancelScheduledAutoMerge",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "index of the pull request to merge",
|
||||
"name": "index",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/pulls/{index}/requested_reviewers": {
|
||||
@@ -8458,7 +8771,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "success"
|
||||
"description": "Returns raw file content."
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
@@ -10898,6 +11211,48 @@
|
||||
}
|
||||
},
|
||||
"/teams/{id}/repos/{org}/{repo}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"organization"
|
||||
],
|
||||
"summary": "List a particular repo of team",
|
||||
"operationId": "orgListTeamRepo",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "id of the team",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "organization that owns the repo to list",
|
||||
"name": "org",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo to list",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/Repository"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -12139,39 +12494,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{follower}/following/{followee}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"user"
|
||||
],
|
||||
"summary": "Check if one user is following another user",
|
||||
"operationId": "userCheckFollowing",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "username of following user",
|
||||
"name": "follower",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "username of followed user",
|
||||
"name": "followee",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{username}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -12277,6 +12599,39 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{username}/following/{target}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"user"
|
||||
],
|
||||
"summary": "Check if one user is following another user",
|
||||
"operationId": "userCheckFollowing",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "username of following user",
|
||||
"name": "username",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "username of followed user",
|
||||
"name": "target",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{username}/gpg_keys": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -13190,6 +13545,9 @@
|
||||
"type": "string",
|
||||
"x-go-name": "SHA"
|
||||
},
|
||||
"stats": {
|
||||
"$ref": "#/definitions/CommitStats"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"x-go-name": "URL"
|
||||
@@ -13245,6 +13603,28 @@
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"CommitStats": {
|
||||
"description": "CommitStats is statistics for a RepoCommit",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"additions": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "Additions"
|
||||
},
|
||||
"deletions": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "Deletions"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "Total"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"CommitStatus": {
|
||||
"description": "CommitStatus holds a single status of a single Commit",
|
||||
"type": "object",
|
||||
@@ -14241,6 +14621,10 @@
|
||||
"type": "string",
|
||||
"x-go-name": "Password"
|
||||
},
|
||||
"restricted": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "Restricted"
|
||||
},
|
||||
"send_notify": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "SendNotify"
|
||||
@@ -14754,6 +15138,10 @@
|
||||
"description": "EditPullRequestOption options when modify pull request",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allow_maintainer_edit": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "AllowMaintainerEdit"
|
||||
},
|
||||
"assignee": {
|
||||
"type": "string",
|
||||
"x-go-name": "Assignee"
|
||||
@@ -14912,6 +15300,11 @@
|
||||
"type": "string",
|
||||
"x-go-name": "Description"
|
||||
},
|
||||
"enable_prune": {
|
||||
"description": "enable prune - remove obsolete remote-tracking references",
|
||||
"type": "boolean",
|
||||
"x-go-name": "EnablePrune"
|
||||
},
|
||||
"external_tracker": {
|
||||
"$ref": "#/definitions/ExternalTracker"
|
||||
},
|
||||
@@ -15475,6 +15868,11 @@
|
||||
"type": "boolean",
|
||||
"x-go-name": "Avatar"
|
||||
},
|
||||
"default_branch": {
|
||||
"description": "Default branch of the new repository",
|
||||
"type": "string",
|
||||
"x-go-name": "DefaultBranch"
|
||||
},
|
||||
"description": {
|
||||
"description": "Description of the repository to create",
|
||||
"type": "string",
|
||||
@@ -16008,6 +16406,10 @@
|
||||
"head_commit_id": {
|
||||
"type": "string",
|
||||
"x-go-name": "HeadCommitID"
|
||||
},
|
||||
"merge_when_checks_succeed": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "MergeWhenChecksSucceed"
|
||||
}
|
||||
},
|
||||
"x-go-name": "MergePullRequestForm",
|
||||
@@ -16608,6 +17010,80 @@
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"Package": {
|
||||
"description": "Package represents a package",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"x-go-name": "CreatedAt"
|
||||
},
|
||||
"creator": {
|
||||
"$ref": "#/definitions/User"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "ID"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"x-go-name": "Name"
|
||||
},
|
||||
"owner": {
|
||||
"$ref": "#/definitions/User"
|
||||
},
|
||||
"repository": {
|
||||
"$ref": "#/definitions/Repository"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"x-go-name": "Type"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"x-go-name": "Version"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"PackageFile": {
|
||||
"description": "PackageFile represents a package file",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Size": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "ID"
|
||||
},
|
||||
"md5": {
|
||||
"type": "string",
|
||||
"x-go-name": "HashMD5"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"x-go-name": "Name"
|
||||
},
|
||||
"sha1": {
|
||||
"type": "string",
|
||||
"x-go-name": "HashSHA1"
|
||||
},
|
||||
"sha256": {
|
||||
"type": "string",
|
||||
"x-go-name": "HashSHA256"
|
||||
},
|
||||
"sha512": {
|
||||
"type": "string",
|
||||
"x-go-name": "HashSHA512"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"PayloadCommit": {
|
||||
"description": "PayloadCommit represents a commit",
|
||||
"type": "object",
|
||||
@@ -16777,6 +17253,10 @@
|
||||
"description": "PullRequest represents a pull request",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allow_maintainer_edit": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "AllowMaintainerEdit"
|
||||
},
|
||||
"assignee": {
|
||||
"$ref": "#/definitions/User"
|
||||
},
|
||||
@@ -17175,6 +17655,24 @@
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"RepoCollaboratorPermission": {
|
||||
"description": "RepoCollaboratorPermission to get repository permission for a collaborator",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"permission": {
|
||||
"type": "string",
|
||||
"x-go-name": "Permission"
|
||||
},
|
||||
"role_name": {
|
||||
"type": "string",
|
||||
"x-go-name": "RoleName"
|
||||
},
|
||||
"user": {
|
||||
"$ref": "#/definitions/User"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"RepoCommit": {
|
||||
"type": "object",
|
||||
"title": "RepoCommit contains information of a commit in the context of a repository.",
|
||||
@@ -17195,6 +17693,9 @@
|
||||
"url": {
|
||||
"type": "string",
|
||||
"x-go-name": "URL"
|
||||
},
|
||||
"verification": {
|
||||
"$ref": "#/definitions/PayloadCommitVerification"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
@@ -18724,6 +19225,30 @@
|
||||
"$ref": "#/definitions/OrganizationPermissions"
|
||||
}
|
||||
},
|
||||
"Package": {
|
||||
"description": "Package",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Package"
|
||||
}
|
||||
},
|
||||
"PackageFileList": {
|
||||
"description": "PackageFileList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PackageFile"
|
||||
}
|
||||
}
|
||||
},
|
||||
"PackageList": {
|
||||
"description": "PackageList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Package"
|
||||
}
|
||||
}
|
||||
},
|
||||
"PublicKey": {
|
||||
"description": "PublicKey",
|
||||
"schema": {
|
||||
@@ -18829,6 +19354,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"RepoCollaboratorPermission": {
|
||||
"description": "RepoCollaboratorPermission",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/RepoCollaboratorPermission"
|
||||
}
|
||||
},
|
||||
"Repository": {
|
||||
"description": "Repository",
|
||||
"schema": {
|
||||
|
||||
Reference in New Issue
Block a user