跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!

Submit a pending review to a pull request

POST
/repos/{owner}/{repo}/pulls/{index}/reviews/{id}
curl --request POST \
--url https://gitea.com/api/v1/repos/example/example/pulls/1/reviews/1 \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "body": "example", "event": "APPROVED" }'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

index
required
integer format: int64

Index of the pull request

id
required
integer format: int64

Id of the review

Media typeapplication/json

SubmitPullReviewOptions are options to submit a pending pull request review

object
body
string
event
string
Allowed values: APPROVED PENDING COMMENT REQUEST_CHANGES REQUEST_REVIEW

PullReview

Media typeapplication/json

PullReview represents a pull request review

object
body
string
comments_count
integer format: int64
commit_id
string
dismissed
boolean
html_url

HTMLURL is the web URL for viewing the review

string
id
integer format: int64
official
boolean
pull_request_url

HTMLPullURL is the web URL for the pull request

string
stale
boolean
state
string
Allowed values: APPROVED PENDING COMMENT REQUEST_CHANGES REQUEST_REVIEW
submitted_at
string format: date-time
team

Team represents a team in an organization

object
can_create_org_repo

Whether the team can create repositories in the organization

boolean
description

The description of the team

string
id

The unique identifier of the team

integer format: int64
includes_all_repositories

Whether the team has access to all repositories in the organization

boolean
name

The name of the team

string
organization

Organization represents an organization

object
avatar_url

The URL of the organization’s avatar

string
description

The description of the organization

string
email

The email address of the organization

string
full_name

The full display name of the organization

string
id

The unique identifier of the organization

integer format: int64
location

The location of the organization

string
name

The name of the organization

string
repo_admin_change_team_access

Whether repository administrators can change team access

boolean
username

Username of the organization deprecated

string
visibility

The visibility level of the organization (public, limited, private) public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate

string
Allowed values: public limited private
website

The website URL of the organization

string
permission
string
Allowed values: none read write admin owner
units
Array<string>
units_map
object
key
additional properties
string
visibility

Team visibility within the organization. “private” teams are only listable by members and org owners; “limited” teams are listable by any organization member; “public” teams are listable by any signed-in user. public TeamVisibilityPublic limited TeamVisibilityLimited private TeamVisibilityPrivate

string
Allowed values: public limited private
updated_at
string format: date-time
user

User represents a user

object
active

Is user active

boolean
avatar_url

URL to the user’s avatar

string
created
string format: date-time
description

The user’s description

string
email
string format: email
followers_count

User counts

integer format: int64
following_count
integer format: int64
full_name

The user’s full name

string
html_url

URL to the user’s gitea page

string
id

The user’s id

integer format: int64
is_admin

Is the user an administrator

boolean
language

User locale

string
last_login
string format: date-time
location

The user’s location

string
login

Login of the user, same as username

string
login_name

Identifier of the user, provided by the external authenticator (if configured)

string
default: empty
prohibit_login

Is user login prohibited

boolean
restricted

Is user restricted

boolean
source_id

The ID of the user’s Authentication Source

integer format: int64
starred_repos_count
integer format: int64
visibility

User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate

string
Allowed values: public limited private
website

The user’s website

string
Example
{
"state": "APPROVED",
"team": {
"organization": {
"visibility": "public"
},
"permission": "none",
"units": [
"repo.code",
"repo.issues",
"repo.ext_issues",
"repo.wiki",
"repo.pulls",
"repo.releases",
"repo.projects",
"repo.ext_wiki"
],
"units_map": {
"repo.code": "read",
"repo.ext_issues": "none",
"repo.ext_wiki": "none",
"repo.issues": "write",
"repo.projects": "none",
"repo.pulls": "owner",
"repo.releases": "none",
"repo.wiki": "admin"
},
"visibility": "public"
},
"user": {
"login_name": "empty",
"visibility": "public"
}
}

APINotFound is a not found empty response

Media typeapplication/json

APIValidationError is error format response related to input validation

Media typeapplication/json
message
string
url
string