Best Practices
Start implementing the practices that will help you get the most out of Waydev.
Mandatory Practices
1. Enforce traceability
Waydev needs to associate your Tickets with the Pull Requests
Always include the Ticket ID in the Pull Request title (or Pull Request description).
2. Global Git user
Impose to all the engineers the practice of setting up git global configuration
If this is not set, then any git provider (GitHub, GitLab, AzureDevOps, etc.) will create a different profile based on the workstation from which the dev works, which in turn will result in different dev profiles in Waydev, which you'll always have to manually merge, so the data will be incomplete.
In order to avoid duplicate contributor profiles, engineers need to run the following commands from their terminal:
- git config --global user.name "[Full Name]"
- git config --global user.email [email]@[company].com
3. Preserve the entire history
Close PRs with merge only
Enable only "merge commits" for Pull Requests.
Merge commits is preferred instead of squashing commits. This way you will have all the historical data and Waydev can leverage the best insights.
So the key ideas are:
- Merge commits - they preserve the commit history and they just add the merge commit which we ignore by default. Perfect scenario.
- Rebase - the commit from the feature branch are rewritten and added to the feature branch. Meaning we might end up with duplicate commits if we get to process the ones from the feature branch before the rebase.
- Squash - all the commits are squashed into a single one. All the history is lost. Coding time will be 0 because the squash has the timestamp of the merge.
Nice-to-have practices
1. Automated first-commit
Not committing at the start of a feature/task will result in skewed working time.
Lead Time For Changes is computed by summing up 4 key development intervals, one of which is Coding Time, which is calculated by looking at the difference between when the first commit was pushed on remote and when the pull request was issued.
If all the commits are pushed right before the creation of the pull request, then the Coding Time will be close to 0, so the data won't be accurate.
2. Git Push immediately
Commit and push continuously.
This improves collaboration, reduces merge conflicts, prevents lost work and enables faster feedback. Also, this way you'll have an accurate Lead Time For Changes in the Waydev platform.
Push as frequently and as early as possible, because Waydev doesn't have access to the commit's creation date, but to the commit's push date.
3. Any work goes through PRs
Leverage continuous integration
Write meaningful commit messages which reflect a logical change and clearly describe what has been done. Avoid unnecessary commits (e.g. "fix typo").
Avoid pushing work-in-progress to the "main" branch for effective continuous pushing. Create PRs instead.
4. Enforce Code Reviewing
Review PRs all the time
Require at least 2 approvals and require conversation resolution before merging.
This ensure better code review practices, knowledge sharing and fewer integration issues.
Updated 1 day ago