Merge Request Update After the Code Review

Context for Merge Request Updates

by Syed Awais

Let's say a developer customised the login flow of Odoo using a module. They created a branch in the project and pushed the code to that branch. Afterwards, they created a merge request for merging the changes. The tech lead reviewed the code and provided feedback. The developer then updated the code and now wants to merge the changes into the existing merge request.

It's important to avoid creating a new merge request; instead, the developer should update the current merge request. Creating a new merge request would require the reviewer to recheck all the code, doubling the effort involved.

Steps to Commit Changes to the Open Merge Request

Code Review

Let's say your code is reviewed and the comments are added. See the reference screenshot:

Code Review
Update the Code

Update the code or implement the suggestion in the code review. Once the code is updated. add the changes to the branch and commit the changes.

Merge Request

Do not create a new merge request. Instead, use the open merge request. The changes made to the branch will be reflected in the changes tab of the merge request.

Merge Request
Update the Review Comment

After updating the code, add a comment explaining the issue, the solution to the problem, and how it was fixed.

Once the comment is added, click "Add Comment Now."

Update the Review Comment

Note: Do not click on "Resolve Thread"; instead, just add the comment. The thread will be resolved by the reviewer if they are satisfied with the changes.

Key Takeaways

By updating an existing merge request instead of creating a new one, developers can streamline the review process and enhance collaboration within the team. Clear communication through comments also helps ensure that feedback is addressed effectively, leading to a more efficient development workflow. Following these steps will save time, improve code quality, and maintain project momentum.

Need more development tips?


Stay tuned to our blog.

How to Undo git add and git Commit Before Push