Overview
In software engineering, squashing allows teams to condense all commits from a pull request into a single commit when merging. This helps keep the commit history clean, but it raises questions about how metrics like Lead Time for Changes are calculated when individual commits are no longer visible.
What we do in Axify
When you squash a pull request, the resulting merge commit is preserved by the source code management tool. We then retrieve all commits since last deployment for the deployed branch, those commits contain also the merge commit of pull requests which we match to its associated pull request. Once matched, we look up the first commit that was part of that pull request. This commit timestamp is used as the starting point for calculating Lead Time for Changes.