If reviewers give you feedback on a pull request, you can incorporate it manually and accept suggested changes automatically.

Applying suggested changes

Note: Suggested changes is currently in beta and subject to change.

You can apply suggested changes directly in a pull request if you have write access to the repository and are the author of or assigned to the pull request.

To quickly incorporate more than one suggested change into a single commit, you can also apply suggested changes as a batch. Applying one suggested change or a batch of suggested changes creates a single commit on the compare branch of the pull request.

Each person who suggested a change included in the commit will be a co-author of the commit. The person who applies the suggested changes will be a co-author and the committer of the commit. For more information about the term committer in Git, see "Git Basics - Viewing the Commit History" from the Pro Git book site.

  1. Under your repository name, click Pull requests. Issues and pull requests tab selection

  2. In the list of pull requests, click the pull request you'd like to apply a suggested change to.

  3. Navigate to the first suggested change you'd like to apply.
    • To apply the change in its own commit, click Commit suggestion. Commit suggestion button
    • To add the suggestion to a batch of changes, click Add suggestion to batch. Continue to add the suggested changes you want to include in a single commit. When you've finished adding suggested changes, click Commit suggestions. Add suggestion to batch button
  4. In the commit message field, type a short, meaningful commit message that describes the change you made to the file or files. Commit message field
  5. Click Commit changes. Commit changes button

Further reading