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?
Make a fork and create pull requests. :)
Forking the repository essentially gives you your own workspace on which you can create branches and push, and you can create pull requests from the differences on your fork to the original repository. Pull requests must be approved by the owner of or someone who can write to the original repository.
More information:
- Github: Using pull requests
- Bitbucket: Work with pull requests
In Bitbucket Server (self-hosted edition) you can suggest a change to a single line of the diff at a time by adding a comment that contains:
```suggestion
replacement.line
lets_go.crazy() and a_second.new_line().is_added
```
https://confluence.atlassian.com/bitbucketserver/commenting-on-a-pull-request-1027119882.html
The resulting suggestion can be accepted directly into the PR and looks something like this:
On the Bitbucket Cloud side, the request for this feature can be tracked here.
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"
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.
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.
Make a fork and create pull requests. :)
Forking the repository essentially gives you your own workspace on which you can create branches and push, and you can create pull requests from the differences on your fork to the original repository. Pull requests must be approved by the owner of or someone who can write to the original repository.
More information:
- Github: Using pull requests
- Bitbucket: Work with pull requests
© 2022 - 2024 — McMap. All rights reserved.