Quality
Creating a merge request
Before you create an MR
Make sure your code is of a high standard prior to submitting the MR for review. Take advantage of IDE extensions to check for spelling, linting and formatting issues.
Suggested IDE extensionsIn addition to the above, you should also check the following:
-
Naming convention
In order for the reviewer to know what to check, provide the correct commit name and description before the merge request. To follow naming rules check these articles:
Branch naming conventions Commit naming conventions -
Comments
- Before a MR: when it’s reasonable write comments for the reviewer. Explain what certain parts of the code does for the reviewer and future you (within the code).
- During a MR: explain requested changes and suggestions if possible (on the ticket or in the MR).
- Small reviews
Keep your MRs small. If you have a big task to do, split it into smaller parts and create separate MRs for each of them. This will make the review process easier and faster.
- Check your ego
Last but not least: we care about the quality of our code together so we don’t treat comments and requests for corrections personally.
Create an MR
When you have completed work on a working branch it’s time to get it reviewed and merged to the main branch. To do so, you need to create a merge request.
Open the GitLab project’s “Merge Requests” screen and click the “New merge request” button.
If you go to the “Merge requests” section immediately after your 1st push,
there is a link to create an MR straight away. Append the MR with WIP:
until
it’s ready for review.
This should launch a new merge request screen:
- Select the source and target branches. The source branch is the branch you want to merge into the target branch. The target branch is the branch you want to merge into. The source branch is usually the branch you are currently working on, and the target branch is usually the main branch of the project.
- The title of your MR should be prefixed with branch name prefix, such as
feature
orbugfix
. The title should be short and descriptive. - In the description field, provide information on what has been committed and a link to the associated Jira ticket.
- Assign to reviewer - someone connected with the project or team.
- Click the “Submit merge request” button.
- Add comments to the MR if you need to provide additional information.
- Move the associated Jira ticket into the review column.
- Where necessary, seek client approval too.