Extract commitMessage expansion to separate method