Skip to content

Commit

Permalink
Merge branch 'master' into gpl-license
Browse files Browse the repository at this point in the history
  • Loading branch information
wandersoncferreira authored Oct 11, 2021
2 parents adfe42c + 7390f49 commit 77265c3
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions github-review.el
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@ ACC is an alist accumulating parsing state."
(erase-buffer)
(insert diff)
(save-buffer)
(github-review-mode)))
(github-review-mode)
;; Use `C-c C-c' in diff-mode to go to source code
(setq default-directory forge-current-dir)
(goto-char (point-min))))

(defun github-review-parsed-review-from-current-buffer ()
"Return a code review given the current buffer containing a diff."
Expand Down Expand Up @@ -508,10 +511,12 @@ Github API provides only the originalPosition in the query.")

(if (not (forge-pullreq-p pullreq))
(message "We can only review PRs at the moment. You tried on something else.")
(github-review-start-internal (a-alist 'owner (oref repo owner)
'repo (oref repo name)
'apihost (oref repo apihost)
'num (oref pullreq number))))))
(progn
(setq forge-current-dir default-directory)
(github-review-start-internal (a-alist 'owner (oref repo owner)
'repo (oref repo name)
'apihost (oref repo apihost)
'num (oref pullreq number)))))))

;;;###autoload
(defun github-review-start (url)
Expand Down

0 comments on commit 77265c3

Please sign in to comment.