aboutsummaryrefslogtreecommitdiffstats
path: root/bug/timeline.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/timeline.go')
-rw-r--r--bug/timeline.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/bug/timeline.go b/bug/timeline.go
index 2f879209..a84c45e4 100644
--- a/bug/timeline.go
+++ b/bug/timeline.go
@@ -1,6 +1,8 @@
package bug
import (
+ "strings"
+
"github.com/MichaelMure/git-bug/util/git"
)
@@ -67,3 +69,8 @@ func (c *CommentTimelineItem) Append(comment Comment) {
func (c *CommentTimelineItem) Edited() bool {
return len(c.History) > 1
}
+
+// MessageIsEmpty return true is the message is empty or only made of spaces
+func (c *CommentTimelineItem) MessageIsEmpty() bool {
+ return len(strings.TrimSpace(c.Message)) == 0
+}