diff --git a/src/pages/task/actionButtons/relevantCommits/index.tsx b/src/pages/task/actionButtons/relevantCommits/index.tsx index e44b5ef765..c54fde1f38 100644 --- a/src/pages/task/actionButtons/relevantCommits/index.tsx +++ b/src/pages/task/actionButtons/relevantCommits/index.tsx @@ -93,6 +93,9 @@ export const RelevantCommits: React.FC = ({ taskId }) => { const passingOrderNumber = getOrderFromMainlineCommitsQuery(lastPassingTaskData); + // The breaking commit is the first failing commit after the last passing commit. + // The skip order number should be the last passing commit's order number + 1. + // We use + 2 because internally the query does a less than comparison. const { data: breakingTaskData, loading: breakingLoading } = useQuery< LastMainlineCommitQuery, LastMainlineCommitQueryVariables