Exemplo n.º 1
0
// sendSuccess sends email notifications to the list of
// recipients indicating the build was a success.
func (e *Email) sendSuccess(context *Context) error {
	// loop through and email recipients
	for _, email := range e.Recipients {
		if err := mail.SendSuccess(context.Repo.Name, context.Commit.HashShort(), email, context); err != nil {
			return err
		}
	}
	return nil
}
Exemplo n.º 2
0
// sendSuccess sends email notifications to the list of
// recipients indicating the build was a success.
func (t *BuildTask) sendSuccessEmail(c *notification.Context) error {

	// loop through and email recipients
	for _, email := range t.Script.Notifications.Email.Recipients {
		if err := mail.SendSuccess(t.Repo.Name, email, c); err != nil {
			return err
		}
	}
	return nil
}