       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
 

      when 'issues' then formatIssues event
      when 'pull_request' then formatPulls event
      when 'push' then formatPushes event
      else null

  formatIssues = (event) ->

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

  formatDeployment = (event) ->
    deployment = data.deployment

    """
    #{deployment.creator.login} started a deployment of #{deployment.sha[0..8]} in #{deployment.name} to #{deployment.environment}
    Description: #{deployment.description}
    """

  formatDeploymentStatus = (event) ->
    deployment_status = event.deployment_status

    """
    Deployment of #{deployment_status.repository.name} to #{deployment_status.deployment.environment} by #{deployment_status.creator.login} has ended in #{deployment_status.state}
    Description: #{deployment_status.description}
    """