public void UdpateDetails(string id, JobStatusDetails details)
        {
            var deployment = _repository.SingleOrDefault(d => d.Id == id);

            if (deployment != null)
            {
                if (string.IsNullOrWhiteSpace(deployment.Details))
                {
                    deployment.Details += details.Details;
                }
                else
                {
                    deployment.Details += "<br>" + details.Details;
                }

                if (details.Status.HasValue)
                {
                    deployment.Status = details.Status.Value.ToString();
                }

                if (details.Status == JobStatus.Error && deployment.UserEmail.HasValue() && _sourceControl.IsVersionNumber(deployment.Revision))
                {
                    _emailSender.SendDeploymentWarningEmail(deployment.Details, deployment.Revision.Tag, deployment.Company.CompanyName, deployment.UserName, deployment.UserEmail, deployment.Server.Name);
                }

                _repository.Update(deployment);
            }
        }