{"id":13601562,"url":"https://github.com/wandersoncferreira/code-review","last_synced_at":"2025-04-04T17:06:54.886Z","repository":{"id":37823504,"uuid":"418017082","full_name":"wandersoncferreira/code-review","owner":"wandersoncferreira","description":"Code Reviews in Emacs","archived":false,"fork":false,"pushed_at":"2024-05-29T03:40:43.000Z","size":2393,"stargazers_count":467,"open_issues_count":63,"forks_count":51,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-02T03:11:31.171Z","etag":null,"topics":["bitbucket","code-review","emacs","github","gitlab"],"latest_commit_sha":null,"homepage":"https://wandersoncferreira.github.io/code-review/","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wandersoncferreira.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-17T04:20:28.000Z","updated_at":"2025-03-18T18:55:16.000Z","dependencies_parsed_at":"2024-01-13T17:09:53.454Z","dependency_job_id":"d52d4b09-8e49-4649-a82e-18e3465a86c9","html_url":"https://github.com/wandersoncferreira/code-review","commit_stats":{"total_commits":586,"total_committers":17,"mean_commits":"34.470588235294116","dds":0.06825938566552903,"last_synced_commit":"26f426e99221a1f9356aabf874513e9105b68140"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandersoncferreira%2Fcode-review","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandersoncferreira%2Fcode-review/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandersoncferreira%2Fcode-review/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandersoncferreira%2Fcode-review/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wandersoncferreira","download_url":"https://codeload.github.com/wandersoncferreira/code-review/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217177,"owners_count":20903009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbucket","code-review","emacs","github","gitlab"],"created_at":"2024-08-01T18:01:04.594Z","updated_at":"2025-04-04T17:06:54.864Z","avatar_url":"https://github.com/wandersoncferreira.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"[![GPL v3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.txt)\n[![MELPA](https://melpa.org/packages/code-review-badge.svg)](https://melpa.org/#/code-review)\n![Tests](https://github.com/wandersoncferreira/code-review/actions/workflows/ci.yml/badge.svg)\n\n# Code Review\n\nPackage to help you perform code reviews from your VC provider. Currently\nsupports Github and basic Gitlab and Bitbucket workflows.\n\n![Demo of code review package](./docs/code_review_demo.png)\n\nLink to same PR on Github: https://github.com/wandersoncferreira/dotfiles/pull/5\n\n# Overview\n\nThe Emacs everywhere goal continues. These are the main features of\n`code-review` to help you never leave Emacs to do Pull Request reviews.\n\n- Start review from URL via `code-review-start`\n- Modern UI using [magit-section](https://emacsair.me/2020/01/23/magit-section/) and [transient](https://github.com/magit/transient)\n- Read Pull Request comments\n- Reply to comments\n- Include code suggestions\n- View `outdated` comments with the right diff hunk context\n- Approve, Reject or Request Changes for your PRs\n- Integrated with `forge-topic-view` via `code-review-forge-pr-at-point`\n- Fast track commands like \"LGTM! Approved\"\n- Review using single commits to focus on diff\n- Set labels on RET. See details [Multi value selection](./docs/multi-value-selection.md)\n- Set assignee. Use transient `sy` option to `assign yourself` to the PR.\n- Set milestone. See details [push access required](./docs/milestone.md)\n- Edit PR title\n- Edit PR description body\n- Merge your PR. _(beta feature) See details [merge](./docs/merge.md)_\n- Reactions. See details [react to comments](./docs/reactions.md)\n- Promote comments to new issues.\n- Save/Resume in-progress Reviews\n- Visit binary files in Dired or Remote. Example [here](https://github.com/wandersoncferreira/code-review/pull/90)\n- Mention user with `C-c @` in `*code-review-comment*` buffer.\n\nHighly recommend using the transient menu in the `*Code Review*` buffer by pressing `r`.\n\nThe basic workflow:\n\n- `RET` on a hunk diff line to add a comment\n- `RET` on a local comment to edit\n- `RET` on a previous sent comment to include a reply\n- `C-c C-k` on a local comment to remove it\n- `r s f` to enable transient and Set a feedback\n- `r a` to approve the PR | `r r` to reject the PR | `r c` to add comments in the PR\n\nYou can include your own bindings to functions like\n`code-review-set-feedback`, `code-review-submit-approve`,\n`code-review-submit-request-changes`, and `code-review-submit-comments` to not rely on the\ntransient panel. But I think you should see it :]\n\nTake a look at which features are available to each integrated forge [here](./docs/forge_support.md).\n\nMissing something? Please, [let us know](https://github.com/wandersoncferreira/code-review/issues/new).\n\n# Installation\n\nI highly recommend installing `code-review` through `package.el`.\n\nIt's available on `MELPA`.\n\n`M-x package-install code-review`\n\nThen you can either `M-x code-review-start` and provide a PR URL or `M-x\ncode-review-forge-pr-at-point` if you are in a forge buffer over a PR.\n\n# Configuration\n\n### Code Review\n\nIf you want to see pretty symbols enable `emojify` package:\n\n``` emacs-lisp\n(add-hook 'code-review-mode-hook #'emojify-mode)\n```\n\nDefine line wrap in comment sections.\n\n``` emacs-lisp\n(setq code-review-fill-column 80)\n```\n\nChange how `code-review` splits the buffer when opening a new PR. Defaults to\n`#'switch-to-buffer-other-window`.\n\n``` emacs-lisp\n(setq code-review-new-buffer-window-strategy #'switch-to-buffer)\n```\n\nChange the destination where binary files is downloaded.\n\n``` emacs-lisp\n(setq code-review-download-dir \"/tmp/code-review/\")\n```\n\n\n#### Experimental\n\nUse passwords configured for forge. The default is `'code-review`.\n\n``` emacs-lisp\n(setq code-review-auth-login-marker 'forge)\n```\n\n#### Doom Emacs users\n\nI've noticed that `*Code Review*` buffer is not added into the current workspace\nin Doom emacs. If you have `workspaces` in your `$DOOMDIR/init.el` file,\nconsider the following snippet:\n\n``` emacs-lisp\n(add-hook 'code-review-mode-hook\n          (lambda ()\n            ;; include *Code-Review* buffer into current workspace\n            (persp-add-buffer (current-buffer))))\n```\n\n#### Insecure private instances\n\nIf your private instance is HTTP not HTTPS, then you need to add the host to the following variable.\n\n```emacs-lisp\n(setq ghub-insecure-hosts '(\"hostname.com\"))\n```\n\n### Forge specific\n\nFollow the documentation to your version control provider to see more details\nfor the setup and configuration.\n\n- [Github](./docs/github.md)\n- [Gitlab](./docs/gitlab.md)\n- [Bitbucket](./docs/bitbucket.md)\n\n# Keybindings\n\nYou can access the transient panel by hitting `r` from any place of the `Code\nReview` buffer.\n\n![Transient keybindings](./docs/code_review_transient.png)\n\n| Binding | Object                                | Action                      |\n|:-------:|:-------------------------------------:|:---------------------------:|\n| RET     | hunk                                  | Add Comment                 |\n| RET     | comment                               | Add Reply                   |\n| RET     | local comment (not sent to forge yet) | Edit local comment          |\n| C-c C-k | local comment                         | Delete local comment        |\n| C-c C-c | Comment Buffer                        | Register your local comment |\n| C-c C-k | Comment Buffer                        | Cancel your local comment   |\n| C-c C-r | comment                               | Add Reaction                |\n| C-c C-n | comment                               | Promote to new issue        |\n| C-c C-r | pr description                        | Add Reaction                |\n| RET     | reaction (on emoji symbol)            | Endorse or Remove Reaction  |\n| RET     | Request Reviewer                      | Request reviewer at point   |\n\n\n## Binding suggestions\n\nYou can place `code-review-forge-pr-at-point` to a key binding for your convenience:\n\n``` emacs-lisp\n(define-key forge-topic-mode-map (kbd \"C-c r\") 'code-review-forge-pr-at-point)\n```\n\nIf you are not an Evil user you can set the letter `k`, for example, to delete a\nlocal comment or feedback at point.\n\n``` emacs-lisp\n(define-key code-review-feedback-section-map (kbd \"k\") 'code-review-section-delete-comment)\n(define-key code-review-local-comment-section-map (kbd \"k\") 'code-review-section-delete-comment)\n(define-key code-review-reply-comment-section-map (kbd \"k\") 'code-review-section-delete-comment)\n```\n\nMove between comments using `C-c C-n` and `C-c C-p`\n\n``` emacs-lisp\n(define-key code-review-mode-map (kbd \"C-c C-n\") 'code-review-comment-jump-next)\n(define-key code-review-mode-map (kbd \"C-c C-p\") 'code-review-comment-jump-previous)\n```\n\n# Extension to other forges\n\nThe package allows you to write integration with other forges to leverage these\nfunctionalities. Take a look at `code-review-interfaces.el` to see which functions\nneed to be implemented.\n\n\n# Thanks\n\nThanks [Laurent Charignon](https://github.com/charignon) for the awesome\n[github-review](https://github.com/charignon/github-review) package and\nstewardship. Github Review made me more familiar with the problem domain and\n`code-review` is an attempt to build on top of it.\n\nThanks [Ag Ibragimov](https://github.com/agzam) for the amazing idea to use\n`magit-section` to build a more suitable interface to this problem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwandersoncferreira%2Fcode-review","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwandersoncferreira%2Fcode-review","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwandersoncferreira%2Fcode-review/lists"}