Make Ctrl+Enter submit a pending comment (starting review) instead of submitting a single comment (#23245)
Close #23241 Before: press Ctrl+Enter in the Code Review Form, a single comment will be added. After: press Ctrl+Enter in the Code Review Form, start the review with pending comments. The old name `is_review` is not clear, so the new code use `pending_review` as the new name. Co-authored-by: delvh <leon@kske.dev> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
47b912cd52
commit
188c8c12c2
9 changed files with 25 additions and 28 deletions
|
@ -268,7 +268,7 @@ func DeletePullReview(ctx *context.APIContext) {
|
|||
ctx.Status(http.StatusNoContent)
|
||||
}
|
||||
|
||||
// CreatePullReview create a review to an pull request
|
||||
// CreatePullReview create a review to a pull request
|
||||
func CreatePullReview(ctx *context.APIContext) {
|
||||
// swagger:operation POST /repos/{owner}/{repo}/pulls/{index}/reviews repository repoCreatePullReview
|
||||
// ---
|
||||
|
@ -360,7 +360,7 @@ func CreatePullReview(ctx *context.APIContext) {
|
|||
line,
|
||||
c.Body,
|
||||
c.Path,
|
||||
true, // is review
|
||||
true, // pending review
|
||||
0, // no reply
|
||||
opts.CommitID,
|
||||
); err != nil {
|
||||
|
|
|
@ -77,7 +77,7 @@ func CreateCodeComment(ctx *context.Context) {
|
|||
signedLine,
|
||||
form.Content,
|
||||
form.TreePath,
|
||||
form.IsReview,
|
||||
!form.SingleReview,
|
||||
form.Reply,
|
||||
form.LatestCommitID,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue