Hi Gerrit users,
We are excited to announce the rollout of the “User Suggest Edit “feature that will enable reviewers to directly suggest code edits in Gerrit. The proposed edits can be reviewed, accepted, or adapted by the change author.
We hope this feature will speed up the code changes by allowing the author to accept suggested code changes without having to make local updates and reuploading a patchset
What:
Reviewers can now use the “Suggest Edit” button from within the comment dialog box to suggest a code block to replace the selected content in a file.
Reviewers can preview the suggestion in full file diff
The suggestion is part of comment and Reviewers send it to the author as other comments with the “Reply”
Author can view all the suggested edits in a file
Author can apply suggestion as is, copy & paste the suggestion to adapt, or reject the suggestion
Author can also preview the suggested edits in full file diff
When:
The features will finish rolling out this Friday (April 28th)
Why:
We want to provide a workflow for the reviewers and authors to suggest, review, and apply code blocks directly to increase the speed of the code changes. This will also help improve the effectiveness of the comments and enable knowledge sharing from senior SWEs. We aim to reduce the overall change review time by increased usage of suggested edits as compared to simple comments.
Impact:
A new “Suggest Edit” link for reviewers in the comments dialog
A new “Show Edit” link for the reviewer to see the suggestion in full file diff view
A new “Show Edit” link for the authors to see the suggestion in full file diff view
A new “Apply Edit” link for the author in the diff view (launched from preview edit) to apply the suggestion.
Exceptions:
Suggested Edit feature is not available for commit messages
Suggested Edits for a previous patchset can not be directly applied in the code on the current patchset to generate a new patchset by the author. Instead, the author will need to copy and paste the suggestion
Help:
Ask a question or give us some feedback: repo-d...@googlegroups.com
File a Bug or Feature Request: https://bugs.chromium.org/p/gerrit/issues/entry?template=GoogleSource+Issue
Thanks,
- Milutin on behalf of the Gerrit Code Review team