fix: confirm review submission and kill buffer on submit
This commit is contained in:
parent
22007c8a75
commit
9db3929117
1 changed files with 11 additions and 7 deletions
|
@ -393,13 +393,17 @@ Collects review body and inline comments from current buffer."
|
||||||
(or (not body) (string-empty-p (string-trim body))))
|
(or (not body) (string-empty-p (string-trim body))))
|
||||||
(error "Review body is required for %s events" event))
|
(error "Review body is required for %s events" event))
|
||||||
|
|
||||||
(unless (ghpr--create-review ghpr--review-repo-name
|
(when (yes-or-no-p (format "Submit review (%s)? " event))
|
||||||
|
(if (ghpr--create-review ghpr--review-repo-name
|
||||||
pr-number
|
pr-number
|
||||||
commit-sha
|
commit-sha
|
||||||
(or body "")
|
(or body "")
|
||||||
event
|
event
|
||||||
api-comments)
|
api-comments)
|
||||||
(message "Failed to submit review"))))
|
(progn
|
||||||
|
(message "Review submitted successfully")
|
||||||
|
(kill-buffer (current-buffer)))
|
||||||
|
(message "Failed to submit review")))))
|
||||||
|
|
||||||
(defun ghpr-review-comment ()
|
(defun ghpr-review-comment ()
|
||||||
"Submit review comments with COMMENT event."
|
"Submit review comments with COMMENT event."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue