Skip to content

Commit

Permalink
update based on issue #41
Browse files Browse the repository at this point in the history
  • Loading branch information
wandersoncferreira committed Oct 10, 2021
1 parent 65975c2 commit 8aa7c49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,6 @@ configure the endpoint of your GitHub Enterprise installation, this should look
you include a comment right after a previous received comment in the diff
buffer, your new comment will be sent as a reply.

- By default, `github-review` does not allow you to move back and forth the diff
buffer and the actual source code.
You can define a list of projects and the respective directory location to
enable `diff-goto-source` (bound to `C-c c-c` by default) e.g.:
```elisp
(setq github-review-projects-worktree
'(("charignon/github-review". "~/.doom.d/sources/github-review")
("magit/forge" . "~/code/oss/magit-forge")))
```

## Notice

*I am providing code in the repository to you under an open source license. Because this is my personal repository, the license you receive to my
Expand Down
8 changes: 2 additions & 6 deletions github-review.el
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,7 @@ ACC is an alist accumulating parsing state."
(github-review-mode)

;; Use `C-c C-c' in diff-mode to go to source code
(when-let ((repo-path (alist-get
(format "%s/%s" .owner .repo)
github-review-projects-worktree
nil nil 'equal)))
(setq diff-remembered-defdir repo-path)
(setq default-directory repo-path))))
(setq default-directory forge-current-dir)))

(defun github-review-parsed-review-from-current-buffer ()
"Return a code review given the current buffer containing a diff."
Expand Down Expand Up @@ -516,6 +511,7 @@ Github API provides only the originalPosition in the query.")
(interactive)
(let* ((pullreq (or (forge-pullreq-at-point) (forge-current-topic)))
(repo (forge-get-repository pullreq)))
(setq forge-current-dir default-directory)
(github-review-start-internal (a-alist 'owner (oref repo owner)
'repo (oref repo name)
'apihost (oref repo apihost)
Expand Down

0 comments on commit 8aa7c49

Please sign in to comment.