Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make code suggestion in github/bitbucket?

What feature do you use when you want to make a suggestion on the code? Let's say, one of the members think it's better to write a specific part of the code in another way and IF IT'S APPROVED then he/she will implement the actual change?

like image 900
Sam R. Avatar asked Dec 12 '22 02:12

Sam R.


1 Answers

Since Oct. 2018, you can make "Suggested Changes" in GitHub:

Collaborators can suggest code changes through inline comments in pull requests, and pull request authors can apply, reject, or edit these suggestions as an integrated part of the code review process.

See "Applying a suggested change"

suggested change

See this tweet for illustration.


Update Nov. 2018: the blog post "Suggested changes—what we've learned so far " adds:

Since its release, more than 10 percent of all reviewers suggested at least one change, totaling over 100,000 suggestions—and nearly four percent of all review comments created included a suggestion. Based on these early numbers, we see you’re quick to adopt suggested changes and make them a natural part of your code review workflow.

https://user-images.githubusercontent.com/602352/47467407-41a9a980-d7c4-11e8-9374-acb6a7c43b00.png

By far the most frequent requests were:

  • The ability to suggest changes to multiple lines at once.
  • The ability to accept multiple changes in a single commit.
like image 123
VonC Avatar answered Dec 26 '22 02:12

VonC