// DeleteBuildComment deletes the given comment from the given build.
func (c *CommitCache) DeleteBuildComment(master, builder string, number int, commentId int64) error {
	if err := c.db.DeleteBuildComment(master, builder, number, commentId); err != nil {
		return fmt.Errorf("Failed to delete comment: %s", err)
	}
	return c.buildCache.RefreshBuild(buildbot.MakeBuildID(master, builder, number))
}
// AddBuildComment adds the given comment to the given build.
func (c *CommitCache) AddBuildComment(master, builder string, number int, comment *buildbot.BuildComment) error {
	if err := c.db.PutBuildComment(master, builder, number, comment); err != nil {
		return fmt.Errorf("Failed to add comment: %s", err)
	}
	return c.buildCache.RefreshBuild(buildbot.MakeBuildID(master, builder, number))
}