Is there a way to suggest edits to a PR?

159 Views Asked by At

Is there a commonly used way to add small edits as code suggestions that the author of a PR can either accept or decline? Something similar to the way a Google Doc allows you to "Suggest Edits"

I'd like to speed up code reviews, and I think this would be a great teaching tool.

1

There are 1 best solutions below

0
On BEST ANSWER

The short answer - yes, there is.

You can add a block inside a fence marked with "suggestion":

```suggestion
throw new Exception("awesome!");
```

This will create a suggestion with code that can be applied automatically: enter image description here

For additional details, see GitHub's documentation about commenting on a pull request and incorporating feedback.