示例#1
0
// 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))
}
示例#2
0
// 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))
}