       else null
 
   formatPushes = (event) ->
+    ordinal = (size, singularNoun) ->
+      noun = if size is 1 then singularNoun else singularNoun + "s"
+      "#{size} #{noun}"
+
     data = event.data
     return unless data.commits and data.commits.length > 0
 

    message += "\n\n#{data.compare}"
    message


  ordinal = (size, singularNoun) ->
    noun = if size is 1 then singularNoun else singularNoun + "s"
    "#{size} #{noun}"
      when 'issues' then formatIssues event
      when 'pull_request' then formatPulls event
      when 'push' then formatPushes event
      when 'deployment' then formatDeployment event
      when 'deployment_status' then formatDeploymentStatus event 
      else null

  formatIssues = (event) ->
