mirror of
https://gitea.com/gitea/tea.git
synced 2026-05-16 04:39:23 +02:00
Add reply to code review
This commit is contained in:
@@ -54,6 +54,21 @@ func ResolvePullReviewComment(ctx *context.TeaContext, commentID int64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ReplyToPullReviewComment replies to a review comment on a pull request.
|
||||
func ReplyToPullReviewComment(ctx *context.TeaContext, idx, commentID int64, body string) error {
|
||||
c := ctx.Login.Client()
|
||||
|
||||
comment, _, err := c.CreatePullReviewCommentReply(ctx.Owner, ctx.Repo, idx, commentID, gitea.CreatePullReviewCommentReplyOptions{
|
||||
Body: body,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println(comment.HTMLURL)
|
||||
return nil
|
||||
}
|
||||
|
||||
// UnresolvePullReviewComment unresolves a review comment
|
||||
func UnresolvePullReviewComment(ctx *context.TeaContext, commentID int64) error {
|
||||
c := ctx.Login.Client()
|
||||
|
||||
Reference in New Issue
Block a user