protected function commitNeedNotification(Commit $commit)
    {
        if (!$commit->isSuccessful()) {
            return true;
        }

        //getProject()->getLatestCommit() actually contains the previous build
        $previousCommit = $commit->getProject()->getLatestCommit();

        return !$previousCommit || $previousCommit->getStatusCode() != $commit->getStatusCode();
    }